Return-path: Received: from mout.web.de ([217.72.192.78]:62784 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752844AbcHTQsR (ORCPT ); Sat, 20 Aug 2016 12:48:17 -0400 Subject: [PATCH 3/3] hostap: Delete unnecessary initialisations for the variable "ret" To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Jouni Malinen , Kalle Valo References: <566ABCD9.1060404@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: (sfid-20160820_184839_731501_0266B6F7) Date: Sat, 20 Aug 2016 18:48:13 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: From: Markus Elfring Date: Sat, 20 Aug 2016 18:23:14 +0200 The local variable "ret" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning of four functions. Signed-off-by: Markus Elfring --- drivers/net/wireless/intersil/hostap/hostap_ioctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intersil/hostap/hostap_ioctl.c b/drivers/net/wireless/intersil/hostap/hostap_ioctl.c index 5942917..c37b0bb 100644 --- a/drivers/net/wireless/intersil/hostap/hostap_ioctl.c +++ b/drivers/net/wireless/intersil/hostap/hostap_ioctl.c @@ -2895,7 +2895,7 @@ static int prism2_ioctl_priv_monitor(struct net_device *dev, int *i) { struct hostap_interface *iface; local_info_t *local; - int ret = 0; + int ret; u32 mode; iface = netdev_priv(dev); @@ -3035,7 +3035,7 @@ static int ap_mac_cmd_ioctl(local_info_t *local, int *cmd) static int prism2_ioctl_priv_download(local_info_t *local, struct iw_point *p) { struct prism2_download_param *param; - int ret = 0; + int ret; if (p->length < sizeof(struct prism2_download_param) || p->length > 1024 || !p->pointer) @@ -3791,7 +3791,7 @@ static int prism2_ioctl_scan_req(local_info_t *local, static int prism2_ioctl_priv_hostapd(local_info_t *local, struct iw_point *p) { struct prism2_hostapd_param *param; - int ret = 0; + int ret; int ap_ioctl = 0; if (p->length < sizeof(struct prism2_hostapd_param) || @@ -3954,7 +3954,7 @@ int hostap_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) struct iwreq *wrq = (struct iwreq *) ifr; struct hostap_interface *iface; local_info_t *local; - int ret = 0; + int ret; iface = netdev_priv(dev); local = iface->local; -- 2.9.3