Patch "HID: sony: remove duplicate NULL check before calling usb_free_urb()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    HID: sony: remove duplicate NULL check before calling usb_free_urb()

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     hid-sony-remove-duplicate-null-check-before-calling-.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit faf769d327ddb2416dbf9d0913b0bf1fe5695964
Author: Jiri Kosina <jkosina@xxxxxxx>
Date:   Wed Oct 4 21:10:41 2023 +0200

    HID: sony: remove duplicate NULL check before calling usb_free_urb()
    
    [ Upstream commit b328dd02e19cb9d3b35de4322f5363516a20ac8c ]
    
    usb_free_urb() does the NULL check itself, so there is no need to duplicate
    it prior to calling.
    
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Fixes: e1cd4004cde7c9 ("HID: sony: Fix a potential memory leak in sony_probe()")
    Signed-off-by: Jiri Kosina <jkosina@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 3ab18811b0090..c330d5a20ca04 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -3074,8 +3074,7 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
 	return ret;
 
 err:
-	if (sc->ghl_urb)
-		usb_free_urb(sc->ghl_urb);
+	usb_free_urb(sc->ghl_urb);
 
 	hid_hw_stop(hdev);
 	return ret;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux