From: Hans de Goede Date: Tue, 19 Jul 2011 12:05:49 +0000 (+0200) Subject: pwc: properly mark device_hint as unused in all probe error paths X-Git-Tag: next-20111110~39^2^2~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9093548a7dc96b61ce3edb26f52b9aad78a5f493;p=karo-tx-linux.git pwc: properly mark device_hint as unused in all probe error paths Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index df639268566f..c1806e3a2ca0 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c @@ -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; }