netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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_kzalloc replaces kmalloc
Date: Fri, 13 Jan 2023 05:35:03 -0800	[thread overview]
Message-ID: <20230113133503.58336-1-sensor1010@163.com> (raw)

use devm_kzalloc replaces kamlloc

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..ebd8ef525557 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_kzalloc(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


             reply	other threads:[~2023-01-13 13:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 13:35 Lizhe [this message]
2023-01-13 13:44 ` [PATCH v1] wireless/at76c50x-usb.c : Use devm_kzalloc replaces kmalloc Eric Dumazet
2023-01-16  6:32   ` Kalle Valo
2023-01-13 21:15 ` kernel test robot
2023-01-14 19:39 ` kernel test robot

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=20230113133503.58336-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).