From 2485055394be272d098ca7dd63193d5041fb8140 Mon Sep 17 00:00:00 2001 From: Christian Gromm Date: Thu, 23 Jan 2020 16:38:18 +0100 Subject: staging: most: core: drop device reference This patch drops the device reference added by function bus_find_device_by_name. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1579793906-5054-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/most/core.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c index d0fe873ce67a..da79076e03d4 100644 --- a/drivers/staging/most/core.c +++ b/drivers/staging/most/core.c @@ -534,6 +534,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)) -- cgit v1.2.3