Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp547939pxb; Sat, 18 Sep 2021 10:08:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxL8jrf5b1+Z3y0iTcxUFqBTNpK6zAl2UsVcOmhWBlBtQDgc4pHamNb0VOWqNSu++oAcIJh X-Received: by 2002:a02:998a:: with SMTP id a10mr12220787jal.23.1631984927365; Sat, 18 Sep 2021 10:08:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631984927; cv=none; d=google.com; s=arc-20160816; b=cSP+ajW6C3dVvfASjIGF5y/eafNkDrXNbt7VyTYMKhY5CTDhItoK8gVfzFWj/41XWk GWvm4OVeU8Zn24WYGrTtSNJNdAIWkzFk7CX3+bRu05kT9F1cZVxCxcFyUqvRSGfxEhGW Fh8MSaNYrAoHivT113o7dG4Tx+fA6GWsYNHKkvWdkEqoyqy9pIVJUFPdVHQic1jscPui Elho2JhOyOanKjIfSnyMglssIWCh2CVfY8GJIi4U9bQcQFbg+gvZ1HHPXHo+4PzyeUmE Qv4htz23NVbfKDcmer/FCReQKvYPUHBYAndbzuSxS5j20iiwZ8Rf7zsMcVl5JKp7nRjp Yw9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=TVy9RXEUq4VooOrw0HxVKB+BAL/uI7MapKGHV7NH7xs=; b=y/U9Un7jxVNAQqDdHEBIYRCABnYpKQvqCUwfkZlAK+z4acN6Lm+VKHKi+kSgXlydCn uFzPI2BJ9yWAgExLlfbL+4UayseEn1aDA+09x4wI5iJOtpeuG3m0QDPkYGZfMww6EK+q Yg/5w4OTak1vwdPOmfydqOr4UC+5bOztZAYUTSKBNAIFmkYrXN8zjBTP1cPyzRmafvvW uaxn939GeSlknRtjQiJ7aYMaIdLU7NAHnDC9juhw9L3PjL0PGwxDx0uU96CnDZZJPe6N Zmwt06oL+ONyHB+it50yuJRmRHAOq8SM+Qyb8E7Z9rb+ejN13I36KWQyfjb5DpfuMaiN rkrA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h5si8690003jaa.119.2021.09.18.10.08.29; Sat, 18 Sep 2021 10:08:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238068AbhIRJMI (ORCPT + 99 others); Sat, 18 Sep 2021 05:12:08 -0400 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:57310 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235575AbhIRJMH (ORCPT ); Sat, 18 Sep 2021 05:12:07 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R861e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0UomJvBZ_1631956239; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UomJvBZ_1631956239) by smtp.aliyun-inc.com(127.0.0.1); Sat, 18 Sep 2021 17:10:42 +0800 From: Jiapeng Chong To: Larry.Finger@lwfinger.net Cc: phil@philpotter.co.uk, gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] staging: r8188eu: Remove unneeded if-null-free check Date: Sat, 18 Sep 2021 17:10:06 +0800 Message-Id: <1631956206-83175-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Eliminate the following coccicheck warning: ./drivers/staging/r8188eu/os_dep/usb_intf.c:545:3-8: WARNING: NULL check before some freeing functions is not needed. Reported-by: Abaci Robot Fixes: 2b42bd58b321 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver") Signed-off-by: Jiapeng Chong --- drivers/staging/r8188eu/os_dep/usb_intf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c index d04d2f65..7e42a0a 100644 --- a/drivers/staging/r8188eu/os_dep/usb_intf.c +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c @@ -541,9 +541,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj, if (status != _SUCCESS) { if (pnetdev) rtw_free_netdev(pnetdev); - else if (padapter) - vfree(padapter); - padapter = NULL; + vfree(padapter); } exit: return padapter; -- 1.8.3.1