Thread (8 messages) flat view 8 messages, 3 authors, 2015-08-17
STALE4007d

[PATCH 4/4] staging: wilc1000: return -EINVAL for invalid argument checking

From: Chaehyun Lim <hidden>
Date: 2015-08-17 13:44:47
Subsystem: staging subsystem, the rest · Maintainers: Greg Kroah-Hartman, Linus Torvalds

This patch uses -EINVAL for invalid argument checking instead of using
WILC_ERRORREPORT with WILC_INVALID_ARGUMENT.

Signed-off-by: Chaehyun Lim <redacted>
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index dd87448..561ff88 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -61,7 +61,7 @@ s32 WILC_MsgQueueSend(WILC_MsgQueueHandle *pHandle,
 	Message *pstrMessage = NULL;
 
 	if ((pHandle == NULL) || (u32SendBufferSize == 0) || (pvSendBuffer == NULL)) {
-		WILC_ERRORREPORT(s32RetStatus, WILC_INVALID_ARGUMENT);
+		return -EINVAL;
 	}
 
 	if (pHandle->bExiting == true) {
@@ -128,7 +128,7 @@ s32 WILC_MsgQueueRecv(WILC_MsgQueueHandle *pHandle,
 	unsigned long flags;
 	if ((pHandle == NULL) || (u32RecvBufferSize == 0)
 	    || (pvRecvBuffer == NULL) || (pu32ReceivedLength == NULL)) {
-		WILC_ERRORREPORT(s32RetStatus, WILC_INVALID_ARGUMENT);
+		return -EINVAL;
 	}
 
 	if (pHandle->bExiting == true) {
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help