提交 cecc2471 编写于 作者: H Huzaifa Sidhpurwala 提交者: Mauro Carvalho Chehab

[media] Prevent null pointer derefernce of pdev

Make sure pdev is not dereferenced when it is null
Signed-off-by: NHuzaifa Sidhpurwala <huzaifas@redhat.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 bbe880b4
......@@ -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 @@ static void usb_pwc_disconnect(struct usb_interface *intf)
}
mutex_unlock(&pdev->modlock);
pwc_cleanup(pdev);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册