diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-03-08 12:36:28 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-08 21:49:58 -0500 |
commit | 054f34da60dfa46457ca39dd111bb2b393575dab (patch) | |
tree | 73be9a400006609ab172456b7c4d4c41740bd523 /net/ncsi/ncsi-netlink.c | |
parent | 50db64b090d0f457a3266fe80e2c841eba621b9d (diff) | |
download | linux-054f34da60dfa46457ca39dd111bb2b393575dab.tar.bz2 |
net/ncsi: unlock on error in ncsi_set_interface_nl()
There are two error paths which are missing unlocks in this function.
Fixes: 955dc68cb9b2 ("net/ncsi: Add generic netlink family")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ncsi/ncsi-netlink.c')
-rw-r--r-- | net/ncsi/ncsi-netlink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ncsi/ncsi-netlink.c b/net/ncsi/ncsi-netlink.c index b73239b76349..05fcfb4fbe1d 100644 --- a/net/ncsi/ncsi-netlink.c +++ b/net/ncsi/ncsi-netlink.c @@ -299,6 +299,7 @@ static int ncsi_set_interface_nl(struct sk_buff *msg, struct genl_info *info) package = np; if (!package) { /* The user has set a package that does not exist */ + spin_unlock_irqrestore(&ndp->lock, flags); return -ERANGE; } @@ -317,6 +318,7 @@ static int ncsi_set_interface_nl(struct sk_buff *msg, struct genl_info *info) /* The user has set a channel that does not exist on this * package */ + spin_unlock_irqrestore(&ndp->lock, flags); netdev_info(ndp->ndev.dev, "NCSI: Channel %u does not exist!\n", channel_id); return -ERANGE; |