Commit f1f48239 authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman
Browse files

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: default avatarChristian Gromm <christian.gromm@microchip.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/1590570387-27069-10-git-send-email-christian.gromm@microchip.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f470a5b0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
}