linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] zd1201: simplify the return expression of zd1201_set_maxassoc()
@ 2020-09-21 13:11 Qinglang Miao
  2020-09-24 15:51 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Qinglang Miao @ 2020-09-21 13:11 UTC (permalink / raw)
  To: Kalle Valo
  Cc: David S. Miller, Jakub Kicinski, linux-wireless, netdev,
	linux-kernel, Qinglang Miao

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(-)

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,
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] zd1201: simplify the return expression of zd1201_set_maxassoc()
  2020-09-21 13:11 [PATCH -next] zd1201: simplify the return expression of zd1201_set_maxassoc() Qinglang Miao
@ 2020-09-24 15:51 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2020-09-24 15:51 UTC (permalink / raw)
  To: Qinglang Miao
  Cc: David S. Miller, Jakub Kicinski, linux-wireless, netdev,
	linux-kernel, Qinglang Miao

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()

-- 
https://patchwork.kernel.org/patch/11789771/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-24 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 13:11 [PATCH -next] zd1201: simplify the return expression of zd1201_set_maxassoc() Qinglang Miao
2020-09-24 15:51 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).