net: don't decrement kobj reference count on init failure
authorstephen hemminger <stephen@networkplumber.org>
Fri, 18 Aug 2017 20:46:19 +0000 (13:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Aug 2017 05:37:03 +0000 (22:37 -0700)
commitd0d6683716791b2a2761a1bb025c613eb73da6c3
tree2bebd60c2b10c02fc44f5ea24f667f4b60dfe35f
parent01d300c577c72229b0a3b09e194cae52b219d5b3
net: don't decrement kobj reference count on init failure

If kobject_init_and_add failed, then the failure path would
decrement the reference count of the queue kobject whose reference
count was already zero.

Fixes: 114cf5802165 ("bql: Byte queue limits")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/net-sysfs.c