From: Chaehyun Lim Date: Wed, 20 Jan 2016 07:44:57 +0000 (+0900) Subject: staging: wilc1000: remove redundant check in wilc_mq_recv X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=eec826439dbe1ad253bb7c4d54ed8777773ec630;p=linux-beck.git staging: wilc1000: remove redundant check in wilc_mq_recv At the beginning of wilc_mq_recv, it is checked if pHandle->bExiting is false or true. There is no need to check it again at the middle of this function. So just remove it. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c index 098390cdf319..abc780c7686c 100644 --- a/drivers/staging/wilc1000/wilc_msgqueue.c +++ b/drivers/staging/wilc1000/wilc_msgqueue.c @@ -133,12 +133,6 @@ int wilc_mq_recv(WILC_MsgQueueHandle *pHandle, spin_unlock_irqrestore(&pHandle->strCriticalSection, flags); down(&pHandle->hSem); - - if (pHandle->bExiting) { - PRINT_ER("pHandle fail\n"); - return -EFAULT; - } - spin_lock_irqsave(&pHandle->strCriticalSection, flags); pstrMessage = pHandle->pstrMessageList;