mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
staging: most: usb: add missing put_device calls
This patch adds the missing put_device() function calls to properly free allocated resources and maintain reference counts. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1590570387-27069-10-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f470a5b01b
commit
f1f48239cd
1 changed files with 2 additions and 0 deletions
|
@ -919,6 +919,7 @@ static void release_dci(struct device *dev)
|
|||
{
|
||||
struct most_dci_obj *dci = to_dci_obj(dev);
|
||||
|
||||
put_device(dev->parent);
|
||||
kfree(dci);
|
||||
}
|
||||
|
||||
|
@ -1123,6 +1124,7 @@ static void hdm_disconnect(struct usb_interface *interface)
|
|||
kfree(mdev->cap);
|
||||
kfree(mdev->conf);
|
||||
kfree(mdev->ep_address);
|
||||
put_device(&mdev->dci->dev);
|
||||
put_device(&mdev->dev);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue