Skip to content

Commit 820ddfa

Browse files
jwrdegoedeMauro Carvalho Chehab
authored andcommitted
[media] radio-shark*: Remove work-around for dangling pointer in usb intfdata
Recent kernels properly clear the usb intfdata pointer when another driver fails to bind (in the radio-shark* case the usbhid driver would try to bind first. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent ac6eb45 commit 820ddfa

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

drivers/media/radio/radio-shark.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,6 @@ static int usb_shark_probe(struct usb_interface *intf,
286286
if (!shark->transfer_buffer)
287287
goto err_alloc_buffer;
288288

289-
/*
290-
* Work around a bug in usbhid/hid-core.c, where it leaves a dangling
291-
* pointer in intfdata causing v4l2-device.c to not set it. Which
292-
* results in usb_shark_disconnect() referencing the dangling pointer
293-
*
294-
* REMOVE (as soon as the above bug is fixed, patch submitted)
295-
*/
296-
usb_set_intfdata(intf, NULL);
297-
298289
shark->v4l2_dev.release = usb_shark_release;
299290
v4l2_device_set_name(&shark->v4l2_dev, DRV_NAME, &shark_instance);
300291
retval = v4l2_device_register(&intf->dev, &shark->v4l2_dev);

drivers/media/radio/radio-shark2.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -258,15 +258,6 @@ static int usb_shark_probe(struct usb_interface *intf,
258258
if (!shark->transfer_buffer)
259259
goto err_alloc_buffer;
260260

261-
/*
262-
* Work around a bug in usbhid/hid-core.c, where it leaves a dangling
263-
* pointer in intfdata causing v4l2-device.c to not set it. Which
264-
* results in usb_shark_disconnect() referencing the dangling pointer
265-
*
266-
* REMOVE (as soon as the above bug is fixed, patch submitted)
267-
*/
268-
usb_set_intfdata(intf, NULL);
269-
270261
shark->v4l2_dev.release = usb_shark_release;
271262
v4l2_device_set_name(&shark->v4l2_dev, DRV_NAME, &shark_instance);
272263
retval = v4l2_device_register(&intf->dev, &shark->v4l2_dev);

0 commit comments

Comments
 (0)