Skip to content

Commit

Permalink
zd1201: simplify the return expression of zd1201_set_maxassoc()
Browse files Browse the repository at this point in the history
Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200921131115.93504-1-miaoqinglang@huawei.com
  • Loading branch information
Qinglang Miao authored and Kalle Valo committed Sep 24, 2020
1 parent ac4bac9 commit 5acbf34
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/net/wireless/zydas/zd1201.c
Original file line number Diff line number Diff line change
Expand Up @@ -1652,15 +1652,11 @@ static int zd1201_set_maxassoc(struct net_device *dev,
struct iw_request_info *info, struct iw_param *rrq, char *extra)
{
struct zd1201 *zd = netdev_priv(dev);
int err;

if (!zd->ap)
return -EOPNOTSUPP;

err = zd1201_setconfig16(zd, ZD1201_RID_CNFMAXASSOCSTATIONS, rrq->value);
if (err)
return err;
return 0;
return zd1201_setconfig16(zd, ZD1201_RID_CNFMAXASSOCSTATIONS, rrq->value);
}

static int zd1201_get_maxassoc(struct net_device *dev,
Expand Down

0 comments on commit 5acbf34

Please sign in to comment.