diff mbox series

[-next] zd1201: simplify the return expression of zd1201_set_maxassoc()

Message ID 20200921131115.93504-1-miaoqinglang@huawei.com (mailing list archive)
State Accepted
Commit 5acbf34e2a2cee13208e6466346ca987eb772d55
Delegated to: Kalle Valo
Headers show
Series [-next] zd1201: simplify the return expression of zd1201_set_maxassoc() | expand

Commit Message

Qinglang Miao Sept. 21, 2020, 1:11 p.m. UTC
Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
 drivers/net/wireless/zydas/zd1201.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Kalle Valo Sept. 24, 2020, 3:51 p.m. UTC | #1
Qinglang Miao <miaoqinglang@huawei.com> wrote:

> Simplify the return expression.
> 
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>

Patch applied to wireless-drivers-next.git, thanks.

5acbf34e2a2c zd1201: simplify the return expression of zd1201_set_maxassoc()
diff mbox series

Patch

diff --git a/drivers/net/wireless/zydas/zd1201.c b/drivers/net/wireless/zydas/zd1201.c
index 41641fc2b..718c4ee86 100644
--- a/drivers/net/wireless/zydas/zd1201.c
+++ b/drivers/net/wireless/zydas/zd1201.c
@@ -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,