From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Justin P. Mattock" Subject: [PATCH]hostap:hostap_ioctl.c Fix variable 'ret' set but not used Date: Mon, 2 Aug 2010 17:04:11 -0700 Message-ID: <1280793851-1719-1-git-send-email-justinmattock@gmail.com> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, j@w1.fi, linville@tuxdriver.com, "Justin P. Mattock" To: linux-wireless@vger.kernel.org Return-path: Received: from mail-pz0-f46.google.com ([209.85.210.46]:40613 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751797Ab0HCAEP (ORCPT ); Mon, 2 Aug 2010 20:04:15 -0400 Sender: netdev-owner@vger.kernel.org List-ID: The below patch fixes a warning message generated by GCC: CC [M] drivers/net/wireless/hostap/hostap_ioctl.o drivers/net/wireless/hostap/hostap_ioctl.c: In function 'prism2_request_scan': drivers/net/wireless/hostap/hostap_ioctl.c:1666:6: warning: variable 'ret' set but not used Keep in mind Im not sure if this is the right fix for this, so please feedback is appreciated. Signed-off-by: Justin P. Mattock --- drivers/net/wireless/hostap/hostap_ioctl.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c index a85e43a..27d462f 100644 --- a/drivers/net/wireless/hostap/hostap_ioctl.c +++ b/drivers/net/wireless/hostap/hostap_ioctl.c @@ -1663,7 +1663,6 @@ static int prism2_request_scan(struct net_device *dev) struct hostap_interface *iface; local_info_t *local; struct hfa384x_scan_request scan_req; - int ret = 0; iface = netdev_priv(dev); local = iface->local; @@ -1689,7 +1688,7 @@ static int prism2_request_scan(struct net_device *dev) if (local->func->set_rid(dev, HFA384X_RID_SCANREQUEST, &scan_req, sizeof(scan_req))) { printk(KERN_DEBUG "SCANREQUEST failed\n"); - ret = -EINVAL; + return -EINVAL; } if (!local->host_roaming) -- 1.7.1.rc1.21.gf3bd6