diff mbox series

[OpenWrt-Devel,v2,2/2,netifd] proto-shell: return error in case setup fails

Message ID 20190401115350.9138-1-dedeckeh@gmail.com
State Accepted
Headers show
Series None | expand

Commit Message

Hans Dedecker April 1, 2019, 11:53 a.m. UTC
In case PROTO_CMD_SETUP cannot be handled due to an invalid state; return
-1 so the calling functions are aware the PROTO_CMD_SETUP has failed.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
---
V1 -> V2: Remove S_SETUP_ABORT, S_TEARDOWN and S_SETUP cases

 proto-shell.c | 5 -----
 1 file changed, 5 deletions(-)
diff mbox series

Patch

diff --git a/proto-shell.c b/proto-shell.c
index 9653f4c..47a9568 100644
--- a/proto-shell.c
+++ b/proto-shell.c
@@ -181,11 +181,6 @@  proto_shell_handler(struct interface_proto_state *proto,
 			state->sm = S_SETUP;
 			break;
 
-		case S_SETUP_ABORT:
-		case S_TEARDOWN:
-		case S_SETUP:
-			return 0;
-
 		default:
 			return -1;
 		}