From: Qiang Ma Date: Wed, 16 Jun 2021 12:53:32 +0000 (+0800) Subject: staging: r8188eu/core: remove the check for NULL pointer in _rtw_enqueue_cmd() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3c07e1eaafdb642fe7f8dd050ce04552c875057e;p=linux.git staging: r8188eu/core: remove the check for NULL pointer in _rtw_enqueue_cmd() Remove the check for _rtw_enqueue_cmd(), because rtw_enqueue_cmd() already has a check of NULL pointer, so this condition is not possible. Signed-off-by: Qiang Ma Link: https://lore.kernel.org/r/20210616125332.31674-1-maqianga@uniontech.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 18eb87052f487..eb89a52aa4e31 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -72,17 +72,12 @@ static int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj) { unsigned long irqL; - if (!obj) - goto exit; - spin_lock_irqsave(&queue->lock, irqL); list_add_tail(&obj->list, &queue->queue); spin_unlock_irqrestore(&queue->lock, irqL); -exit: - return _SUCCESS; }