netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] wireless/at76c50x-usb.c : Use devm_kmalloc replaces kmalloc
@ 2023-01-13 14:12 Lizhe
  2023-01-13 17:22 ` kernel test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Lizhe @ 2023-01-13 14:12 UTC (permalink / raw)
  To: kvalo, davem, edumazet, kuba, pabeni, johannes.berg, alexander
  Cc: linux-wireless, netdev, linux-kernel, Lizhe

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-15 12:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-13 14:12 [PATCH v1] wireless/at76c50x-usb.c : Use devm_kmalloc replaces kmalloc Lizhe
2023-01-13 17:22 ` kernel test robot
2023-01-14  9:43 ` kernel test robot
2023-01-15 12:13 ` Leon Romanovsky

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