From patchwork Sat Aug 20 16:48:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9291775 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 849A9600CB for ; Sat, 20 Aug 2016 16:48:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7234A28BE0 for ; Sat, 20 Aug 2016 16:48:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62A1728BE4; Sat, 20 Aug 2016 16:48:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12C0E28BE0 for ; Sat, 20 Aug 2016 16:48:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753369AbcHTQsS (ORCPT ); Sat, 20 Aug 2016 12:48:18 -0400 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 Received: from [192.168.1.3] ([77.181.94.18]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0Ls91n-1bARJy2Sy7-013uke; Sat, 20 Aug 2016 18:48:13 +0200 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: Date: Sat, 20 Aug 2016 18:48:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: X-Provags-ID: V03:K0:bnlywIxWtob5jKTYSt9yAsjLF8gPo/zrAn1XMkbyTgnyQKNqi+T 2HG0uwaUCOLZlzpqL4FcwpNlIS/vIOlcqG/7i15BFAnuSwZMWIHZS1yciYXLkJrulLibAWm oabwa5DrVB/6YLcBheCuBgT9NUxzcYr0+oKPw0x5xairW/5LfFFL2UqMET2xX7mITlkHUkF rrcbpLKAI9wxejaliT44Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:NvDmfwdVxsI=:ZXC/NwGxY3eS5QhRf7jXGn hXyC1/EtBmEQpufeeQd+AQOsoIOmufIFs/Akbfic1Qmye026YaqoLdQj3S0i0IWTItOqZeE/g oRHZ+V/5PJjCVI0hvneQw3xp88xaS/vHnQAh4VZzv0ogVn+HqxShBvUKpgLtBLEs5I4PojJBH 5y3d+HYQBPAILnkc0tN1i7TCErCSfV87jA9OkdOE4IvG/Lrg/0SYcfVQ2dnb+JQksgUwykdOp u+QJYautLBOXImOeyBtsdwYFg5vKmWFgWKVYr3rx2VWwf9CtlotAkS5JQJU00o3DtIfeVQKdn P2CNgX5PBEg8y86nG3P9e96WLPztkVXQUEPD7YF+yPyo4WCmqw/iMYeUp9sRLIJVGGBRKqNSd 0NSA0pep+e49N9lxJsfRV/wkYZBEHuHO5fh2jqG4dnRZn8DPSmXVDHEtCy8pC/tc+OwsNHblY zgrxDHHWGJwuJVY0IDRvNs5Z1bg6X0/8GHlEcLUphNFwZU7KOYO5AQOO3fBpjm4DcogMzl5cN mZUDn7ROCcBkD5k8o8hyt+6Y1VdoevGaH/g3JPmHEmxjCPtmak7NsFEjJQtxU+FsROWcb30m2 ytinEzsWRi+YNjAHsufrguTdNj/krrz8zpHV+DPkzIf5B5hcwKsl2KwvGO7hzP2G/qLQad9Ve z5WdPjHJI1c81WpvGwrW5z6V5fY4AE26swtrkyRkfA8IQZYzmNUeFsgCukgtTkMW03B4vbz77 h3Amgk3Y5GhaKImVmj28eOt+I0Mmzft3nQ2VRW50VX6xC20zaVTEP5EuqePlIBY0qhYdhTe5K wy8whGw Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;