mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
[media] pwc: Properly mark device_hint as unused in all probe error paths
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
76ae853844
commit
32c67ecc4a
@ -1266,14 +1266,14 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
|
||||
return 0;
|
||||
|
||||
err_video_unreg:
|
||||
if (hint < MAX_DEV_HINTS)
|
||||
device_hint[hint].pdev = NULL;
|
||||
video_unregister_device(&pdev->vdev);
|
||||
err_unregister_v4l2_dev:
|
||||
v4l2_device_unregister(&pdev->v4l2_dev);
|
||||
err_free_controls:
|
||||
v4l2_ctrl_handler_free(&pdev->ctrl_handler);
|
||||
err_free_mem:
|
||||
if (hint < MAX_DEV_HINTS)
|
||||
device_hint[hint].pdev = NULL;
|
||||
kfree(pdev);
|
||||
return rc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user