mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-19 12:24:34 +08:00
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 <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1579793906-5054-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
723de0f917
commit
2485055394
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user