[PATCH v4 02/10] staging: most: core: drop device reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch drops the device reference added by function
bus_find_device_by_name.

Signed-off-by: Christian Gromm <christian.gromm@xxxxxxxxxxxxx>
---
v4:
	This patch has beed added to the series

 drivers/staging/most/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c
index d907f93..84d4f52 100644
--- a/drivers/staging/most/core.c
+++ b/drivers/staging/most/core.c
@@ -533,6 +533,7 @@ static struct most_channel *get_channel(char *mdev, char *mdev_ch)
 	dev = bus_find_device_by_name(&mc.bus, NULL, mdev);
 	if (!dev)
 		return NULL;
+	put_device(dev);
 	iface = dev_get_drvdata(dev);
 	list_for_each_entry_safe(c, tmp, &iface->p->channel_list, list) {
 		if (!strcmp(dev_name(&c->dev), mdev_ch))
-- 
2.7.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux