mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
staging: most: usb: check for NULL device
Check if the dci structer has been allocated before trying to release it. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1579793906-5054-8-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f9e6b51a99
commit
fc157998b8
@ -1218,7 +1218,8 @@ static void hdm_disconnect(struct usb_interface *interface)
|
||||
del_timer_sync(&mdev->link_stat_timer);
|
||||
cancel_work_sync(&mdev->poll_work_obj);
|
||||
|
||||
device_unregister(&mdev->dci->dev);
|
||||
if (mdev->dci)
|
||||
device_unregister(&mdev->dci->dev);
|
||||
most_deregister_interface(&mdev->iface);
|
||||
|
||||
kfree(mdev->busy_urbs);
|
||||
|
Loading…
Reference in New Issue
Block a user