diff options
author | 2020-05-27 11:06:26 +0200 | |
---|---|---|
committer | 2020-05-27 12:26:13 +0200 | |
commit | f1f48239cde4373c5410c065f2a51b3ce15aa3b6 (patch) | |
tree | ca198c060abbb9959546d78772b791a03e2ee1ed /drivers/staging/most | |
parent | staging: most: usb: use correct error codes (diff) | |
download | linux-f1f48239cde4373c5410c065f2a51b3ce15aa3b6.tar.gz linux-f1f48239cde4373c5410c065f2a51b3ce15aa3b6.tar.bz2 linux-f1f48239cde4373c5410c065f2a51b3ce15aa3b6.zip |
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>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r-- | drivers/staging/most/usb/usb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/most/usb/usb.c b/drivers/staging/most/usb/usb.c index 3575a4028039..1c4bdb8f4cd7 100644 --- a/drivers/staging/most/usb/usb.c +++ b/drivers/staging/most/usb/usb.c @@ -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); } |