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>
package = np;
if (!package) {
/* The user has set a package that does not exist */
+ spin_unlock_irqrestore(&ndp->lock, flags);
return -ERANGE;
}
/* 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;