* [PATCH 3/16] drivers/net/wireless/wl12xx: Use available error codes
@ 2010-08-16 16:25 Julia Lawall
[not found] ` <Pine.LNX.4.64.1008161825010.19313-QfmoRoYWmW9knbxzx/v8hQ@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2010-08-16 16:25 UTC (permalink / raw)
To: Kalle Valo, John W. Linville, linux-wireless, netdev,
linux-kernel, kernel-janitors
From: Julia Lawall <julia@diku.dk>
In each case, error codes are stored in ret, but the return value is always
0. Return ret instead.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r@
local idexpression x;
constant C;
@@
if (...) { ...
x = -C
... when != x
(
return <+...x...+>;
|
return NULL;
|
return;
|
* return ...;
)
}
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
This changes the semantics and has not been tested.
drivers/net/wireless/wl12xx/wl1251_acx.c | 2 +-
drivers/net/wireless/wl12xx/wl1251_cmd.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1251_acx.c b/drivers/net/wireless/wl12xx/wl1251_acx.c
index 91891f9..2f8a2ba 100644
--- a/drivers/net/wireless/wl12xx/wl1251_acx.c
+++ b/drivers/net/wireless/wl12xx/wl1251_acx.c
@@ -380,7 +380,7 @@ int wl1251_acx_pd_threshold(struct wl1251 *wl)
out:
kfree(pd);
- return 0;
+ return ret;
}
int wl1251_acx_slot(struct wl1251 *wl, enum acx_slot_type slot_time)
diff --git a/drivers/net/wireless/wl12xx/wl1251_cmd.c b/drivers/net/wireless/wl12xx/wl1251_cmd.c
index a37b30c..949b6a3 100644
--- a/drivers/net/wireless/wl12xx/wl1251_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1251_cmd.c
@@ -200,7 +200,7 @@ int wl1251_cmd_vbm(struct wl1251 *wl, u8 identity,
out:
kfree(vbm);
- return 0;
+ return ret;
}
int wl1251_cmd_data_path(struct wl1251 *wl, u8 channel, bool enable)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 3/16] drivers/net/wireless/wl12xx: Use available error codes
[not found] ` <Pine.LNX.4.64.1008161825010.19313-QfmoRoYWmW9knbxzx/v8hQ@public.gmane.org>
@ 2010-08-16 17:47 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2010-08-16 17:47 UTC (permalink / raw)
To: Julia Lawall
Cc: John W. Linville, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
On 08/16/2010 07:25 PM, Julia Lawall wrote:
> From: Julia Lawall <julia-dAYI7NvHqcQ@public.gmane.org>
>
> In each case, error codes are stored in ret, but the return value is always
> 0. Return ret instead.
Thanks, looks correct to me.
Acked-by: Kalle Valo <kvalo-BkwN83ws05HQT0dZR+AlfA@public.gmane.org>
Kalle
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-16 17:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-16 16:25 [PATCH 3/16] drivers/net/wireless/wl12xx: Use available error codes Julia Lawall
[not found] ` <Pine.LNX.4.64.1008161825010.19313-QfmoRoYWmW9knbxzx/v8hQ@public.gmane.org>
2010-08-16 17:47 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).