This patch drops the device reference added by function
bus_find_device_by_name.

Signed-off-by: Christian Gromm <christian.gr...@microchip.com>
---
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
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to