summaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2012-08-16 23:46:56 +0200
committerDavid S. Miller <davem@davemloft.net>2012-08-20 11:33:21 +0200
commit82a820e8d75f7f3fcd1af24609da79d7d89d5450 (patch)
tree6ae71c98b2310e795bde9b236c6db97bb0ea739f /drivers/net/wimax
parentsmsc75xx: add missing entry to MAINTAINERS (diff)
downloadlinux-82a820e8d75f7f3fcd1af24609da79d7d89d5450.tar.xz
linux-82a820e8d75f7f3fcd1af24609da79d7d89d5450.zip
drivers/net/wimax/i2400m/fw.c: fix error return code
Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e1,e2; @@ if (ret < 0) { ... return ret; } ... when != ret = e1 when forall *if(...) { ... when != ret = e2 * return ret; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wimax')
-rw-r--r--drivers/net/wimax/i2400m/fw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wimax/i2400m/fw.c b/drivers/net/wimax/i2400m/fw.c
index 283237f6f074..def12b38cbf7 100644
--- a/drivers/net/wimax/i2400m/fw.c
+++ b/drivers/net/wimax/i2400m/fw.c
@@ -326,8 +326,10 @@ int i2400m_barker_db_init(const char *_options)
unsigned barker;
options_orig = kstrdup(_options, GFP_KERNEL);
- if (options_orig == NULL)
+ if (options_orig == NULL) {
+ result = -ENOMEM;
goto error_parse;
+ }
options = options_orig;
while ((token = strsep(&options, ",")) != NULL) {