Commit 32c67ecc authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

[media] pwc: Properly mark device_hint as unused in all probe error paths

Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 76ae8538
...@@ -1266,14 +1266,14 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id ...@@ -1266,14 +1266,14 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
return 0; return 0;
err_video_unreg: err_video_unreg:
if (hint < MAX_DEV_HINTS)
device_hint[hint].pdev = NULL;
video_unregister_device(&pdev->vdev); video_unregister_device(&pdev->vdev);
err_unregister_v4l2_dev: err_unregister_v4l2_dev:
v4l2_device_unregister(&pdev->v4l2_dev); v4l2_device_unregister(&pdev->v4l2_dev);
err_free_controls: err_free_controls:
v4l2_ctrl_handler_free(&pdev->ctrl_handler); v4l2_ctrl_handler_free(&pdev->ctrl_handler);
err_free_mem: err_free_mem:
if (hint < MAX_DEV_HINTS)
device_hint[hint].pdev = NULL;
kfree(pdev); kfree(pdev);
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment