aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorHuzaifa Sidhpurwala <huzaifas@redhat.com>2011-05-09 06:32:24 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 18:55:57 -0400
commitcecc2471ea719a359b253449781a584e319d8909 (patch)
tree08a9f436d7433c5920a26927fb9f3ede688fe4d9 /drivers/media
parentbbe880b4a7c66ba14b67ee7acfbaaaa1c7be2d03 (diff)
[media] Prevent null pointer derefernce of pdev
Make sure pdev is not dereferenced when it is null Signed-off-by: Huzaifa Sidhpurwala <huzaifas@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/pwc/pwc-if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index 780af5f81642..356cd42b593b 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -1850,7 +1850,6 @@ static void usb_pwc_disconnect(struct usb_interface *intf)
1850 } else { 1850 } else {
1851 /* Device is closed, so we can safely unregister it */ 1851 /* Device is closed, so we can safely unregister it */
1852 PWC_DEBUG_PROBE("Unregistering video device in disconnect().\n"); 1852 PWC_DEBUG_PROBE("Unregistering video device in disconnect().\n");
1853 pwc_cleanup(pdev);
1854 1853
1855disconnect_out: 1854disconnect_out:
1856 /* search device_hint[] table if we occupy a slot, by any chance */ 1855 /* search device_hint[] table if we occupy a slot, by any chance */
@@ -1860,6 +1859,7 @@ disconnect_out:
1860 } 1859 }
1861 1860
1862 mutex_unlock(&pdev->modlock); 1861 mutex_unlock(&pdev->modlock);
1862 pwc_cleanup(pdev);
1863} 1863}
1864 1864
1865 1865