Skip to content

Commit 48a322b

Browse files
edumazetdavem330
authored andcommitted
net-sysfs: fix netdev_queue_add_kobject() breakage
kobject_put() should only be called in error path. Fixes: b8eb718 ("net-sysfs: Fix reference count leak in rx|netdev_queue_add_kobject") Signed-off-by: Eric Dumazet <[email protected]> Cc: Jouni Hogander <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 064a189 commit 48a322b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/core/net-sysfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,6 +1474,7 @@ static int netdev_queue_add_kobject(struct net_device *dev, int index)
14741474
#endif
14751475

14761476
kobject_uevent(kobj, KOBJ_ADD);
1477+
return 0;
14771478

14781479
err:
14791480
kobject_put(kobj);

0 commit comments

Comments
 (0)