[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1445439337-19055-10-git-send-email-punitvara@gmail.com>
Date: Wed, 21 Oct 2015 20:25:31 +0530
From: Punit Vara <punitvara@...il.com>
To: kvalo@....qualcomm.com
Cc: stas.yakovlev@...il.com, chaoming_li@...lsil.com.cn,
Larry.Finger@...inger.net, chunkeey@...glemail.com,
sgruszka@...hat.com, brudley@...adcom.com, arend@...adcom.com,
linville@...driver.com, jirislaby@...il.com, mickflemm@...il.com,
mcgrof@...not-panic.com, k.eugene.e@...il.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
brcm80211-dev-list@...adcom.com, wcn36xx@...ts.infradead.org,
johannes.berg@...el.com, meuleman@...adcom.com,
Punit Vara <punitvara@...il.com>
Subject: [PATCH 09/15] net: wireless: simplify return flow for zd1201_setconfig16
This patch is to the zd1201.c file that fixes up warning
reported by coccicheck:
WARNING: end returns can be simplified and declaration on line 1658 can
be dropped
Prefer direct return value instead of writing 2-3 more sentence.
Signed-off-by: Punit Vara <punitvara@...il.com>
---
drivers/net/wireless/zd1201.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c
index 6f5c793..d9e67d9 100644
--- a/drivers/net/wireless/zd1201.c
+++ b/drivers/net/wireless/zd1201.c
@@ -1655,15 +1655,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.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists