mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 15:10:38 +00:00
[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>
This commit is contained in:
parent
bbe880b4a7
commit
cecc2471ea
@ -1850,7 +1850,6 @@ static void usb_pwc_disconnect(struct usb_interface *intf)
|
||||
} else {
|
||||
/* Device is closed, so we can safely unregister it */
|
||||
PWC_DEBUG_PROBE("Unregistering video device in disconnect().\n");
|
||||
pwc_cleanup(pdev);
|
||||
|
||||
disconnect_out:
|
||||
/* search device_hint[] table if we occupy a slot, by any chance */
|
||||
@ -1860,6 +1859,7 @@ disconnect_out:
|
||||
}
|
||||
|
||||
mutex_unlock(&pdev->modlock);
|
||||
pwc_cleanup(pdev);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user