Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 054f34da authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

net/ncsi: unlock on error in ncsi_set_interface_nl()



There are two error paths which are missing unlocks in this function.

Fixes: 955dc68c ("net/ncsi: Add generic netlink family")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 50db64b0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;