From: Lizhe <sensor1010@163.com>
To: kvalo@kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, johannes.berg@intel.com,
alexander@wetzel-home.de
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Lizhe <sensor1010@163.com>
Subject: [PATCH v1] wireless/at76c50x-usb.c : Use devm_kmalloc replaces kmalloc
Date: Fri, 13 Jan 2023 06:12:31 -0800 [thread overview]
Message-ID: <20230113141231.71892-1-sensor1010@163.com> (raw)
use devm_kmalloc replaces kmalloc
Signed-off-by: Lizhe <sensor1010@163.com>
---
drivers/net/wireless/atmel/at76c50x-usb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c
index 009bca34ece3..f486ddb83d46 100644
--- a/drivers/net/wireless/atmel/at76c50x-usb.c
+++ b/drivers/net/wireless/atmel/at76c50x-usb.c
@@ -2444,7 +2444,7 @@ static int at76_probe(struct usb_interface *interface,
udev = usb_get_dev(interface_to_usbdev(interface));
- fwv = kmalloc(sizeof(*fwv), GFP_KERNEL);
+ fwv = devm_kmalloc(sizeof(*fwv), GFP_KERNEL);
if (!fwv) {
ret = -ENOMEM;
goto exit;
@@ -2535,7 +2535,6 @@ static int at76_probe(struct usb_interface *interface,
at76_delete_device(priv);
exit:
- kfree(fwv);
if (ret < 0)
usb_put_dev(udev);
return ret;
--
2.17.1
next reply other threads:[~2023-01-13 14:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 14:12 Lizhe [this message]
2023-01-13 17:22 ` [PATCH v1] wireless/at76c50x-usb.c : Use devm_kmalloc replaces kmalloc kernel test robot
2023-01-14 9:43 ` kernel test robot
2023-01-15 12:13 ` Leon Romanovsky
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=20230113141231.71892-1-sensor1010@163.com \
--to=sensor1010@163.com \
--cc=alexander@wetzel-home.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=johannes.berg@intel.com \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).