Skip to content

Commit

Permalink
[media] pwc: Properly mark device_hint as unused in all probe error p…
Browse files Browse the repository at this point in the history
…aths

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Jan 6, 2012
1 parent 76ae853 commit 32c67ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/pwc/pwc-if.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 32c67ec

Please sign in to comment.