Skip to content

Commit

Permalink
wireless/at76c50x-usb.c : Use devm_kzalloc replaces kmalloc
Browse files Browse the repository at this point in the history
use devm_kzalloc replaces kamlloc

Signed-off-by: Lizhe <sensor1010@163.com>
  • Loading branch information
leesagacious authored and intel-lab-lkp committed Jan 13, 2023
1 parent d64c732 commit 8158106
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/atmel/at76c50x-usb.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 8158106

Please sign in to comment.