diff options
| author | saturneric <[email protected]> | 2025-12-01 11:31:10 +0000 |
|---|---|---|
| committer | saturneric <[email protected]> | 2025-12-01 11:31:10 +0000 |
| commit | fa2a26ee8b4693d3733a7d58863cb38cb0e8680e (patch) | |
| tree | 01f99691b8e34c516e435932f1353ad673bedf2e /drivers/hid/hid-ntrig.c | |
| parent | fix(driver): sync specific drivers from rpi upstream (diff) | |
| parent | Linux 6.18 (diff) | |
| download | kernel-main.tar.gz kernel-main.zip | |
Merge tag 'v6.18' into linux-6.18.yHEADmainlinux-6.18.y
Linux 6.18
Diffstat (limited to 'drivers/hid/hid-ntrig.c')
| -rw-r--r-- | drivers/hid/hid-ntrig.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c index 0f76e241e0af..a7f10c45f62b 100644 --- a/drivers/hid/hid-ntrig.c +++ b/drivers/hid/hid-ntrig.c @@ -142,13 +142,13 @@ static void ntrig_report_version(struct hid_device *hdev) int ret; char buf[20]; struct usb_device *usb_dev = hid_to_usb_dev(hdev); - unsigned char *data = kmalloc(8, GFP_KERNEL); + unsigned char *data __free(kfree) = kmalloc(8, GFP_KERNEL); if (!hid_is_usb(hdev)) return; if (!data) - goto err_free; + return; ret = usb_control_msg(usb_dev, usb_rcvctrlpipe(usb_dev, 0), USB_REQ_CLEAR_FEATURE, @@ -163,9 +163,6 @@ static void ntrig_report_version(struct hid_device *hdev) hid_info(hdev, "Firmware version: %s (%02x%02x %02x%02x)\n", buf, data[2], data[3], data[4], data[5]); } - -err_free: - kfree(data); } static ssize_t show_phys_width(struct device *dev, |
