Remove the unneeded and redundant check of variable on goto out.
Simplify the return using multiple goto label to avoid
unneeded check.
Signed-off-by: Saurav Girepunje <saurav.girepunje@xxxxxxxxx>
ret = cfg80211_register_netdevice(mon_ndev);
if (ret) {
- goto out;
+ goto err_register;
}
*ndev = pwdev_priv->pmon_ndev = mon_ndev;
memcpy(pwdev_priv->ifname_mon, name, IFNAMSIZ+1);
+ goto out;
+out:
return ret;
}