]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: Fix incorrect variable assignment on error path in br_sysfs_addbr
authorBastien Philbert <bastienphilbert@gmail.com>
Sun, 3 Apr 2016 23:04:26 +0000 (19:04 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Apr 2016 20:12:37 +0000 (16:12 -0400)
commitbe429ab789fd9a4626fae9a40a938a7e1fdce652
treed24f3d91bc9a6ed01a6190f4e3c34c0247a58fde
parentd0e9095480526e27faa8dda007ae60727ed26f78
bridge: Fix incorrect variable assignment on error path in br_sysfs_addbr

This fixes the incorrect variable assignment on error path in
br_sysfs_addbr for when the call to kobject_create_and_add
fails to assign the value of -EINVAL to the returned variable of
err rather then incorrectly return zero making callers think this
function has succeededed due to the previous assignment being
assigned zero when assigning it the successful return value of
the call to sysfs_create_group which is zero.

Signed-off-by: Bastien Philbert <bastienphilbert@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_sysfs_br.c