Search Linux Wireless

Re: [PATCH v3]hostap:hostap_ioctl.c Fix variable 'ret' set but not used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 3, 2010 at 11:46, Justin P. Mattock <justinmattock@xxxxxxxxx> wrote:
> Resend version 3
>
> 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
>
> Signed-off-by: Justin P. Mattock <justinmattock@xxxxxxxxx>
>
> ---
>  drivers/net/wireless/hostap/hostap_ioctl.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
> index a85e43a..2cf6532 100644
> --- a/drivers/net/wireless/hostap/hostap_ioctl.c
> +++ b/drivers/net/wireless/hostap/hostap_ioctl.c
> @@ -1689,7 +1689,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 ret;
>        }
>
>        if (!local->host_roaming)

NACK: This doesn't actually fix the error mentioned.

Attached is a more correct patch.

Apologies for the attachment, I'm building the patch by hand at work
and only have gMail to send it with.

This should apply to wireless-testing.

Thanks,

-- 

Julian Calaby

Email: julian.calaby@xxxxxxxxx
.Plan: http://sites.google.com/site/juliancalaby/
Hostap: Fix "'ret' set but not used" warning message from GCC in hostap

 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

Signed-off-by: Julian Calaby <julian.calaby@xxxxxxxxx>

---

--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -1696,7 +1696,7 @@
 		hostap_set_word(dev, HFA384X_RID_CNFROAMINGMODE,
 				HFA384X_ROAMING_FIRMWARE);
 
-	return 0;
+	return ret;
 }
 
 #else /* !PRISM2_NO_STATION_MODES */

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux