Skip to content

Commit 2485055

Browse files
cgrogregkh
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 723de0f commit 2485055

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/staging/most/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@ static struct most_channel *get_channel(char *mdev, char *mdev_ch)
534534
dev = bus_find_device_by_name(&mc.bus, NULL, mdev);
535535
if (!dev)
536536
return NULL;
537+
put_device(dev);
537538
iface = dev_get_drvdata(dev);
538539
list_for_each_entry_safe(c, tmp, &iface->p->channel_list, list) {
539540
if (!strcmp(dev_name(&c->dev), mdev_ch))

0 commit comments

Comments
 (0)