From: SebinSebastian <mailmesebin00@gmail.com>
Cc: mailmesebin00@gmail.com, skhan@linuxfoundation.org,
Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Martin Kaiser <martin@kaiser.cx>,
Michael Straube <straube.linux@gmail.com>,
Pavel Skripkin <paskripkin@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: r8188eu: Remove null checking before freeing functions
Date: Sun, 26 Jun 2022 13:14:11 +0530 [thread overview]
Message-ID: <20220626074417.661312-1-mailmesebin00@gmail.com> (raw)
Fix the following coccicheck warning:
drivers/staging/r8188eu/os_dep/usb_intf.c:376:2-7: WARNING: NULL check before some freeing functions is not needed.
Signed-off-by: Sebin Sebastian <mailmesebin00@gmail.com>
---
drivers/staging/r8188eu/os_dep/usb_intf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
index 68869c5daeff..f5f1119b5444 100644
--- a/drivers/staging/r8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
@@ -372,8 +372,8 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
free_adapter:
if (pnetdev)
rtw_free_netdev(pnetdev);
- else if (padapter)
- vfree(padapter);
+
+ vfree(padapter);
return NULL;
}
--
2.34.1
next reply other threads:[~2022-06-26 7:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-26 7:44 SebinSebastian [this message]
2022-06-26 7:59 ` [PATCH] staging: r8188eu: Remove null checking before freeing functions Philipp Hortmann
2022-06-26 8:20 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220626074417.661312-1-mailmesebin00@gmail.com \
--to=mailmesebin00@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=martin@kaiser.cx \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
--cc=skhan@linuxfoundation.org \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox