diff options
author | David Miller <davem@davemloft.net> | 2011-05-19 17:37:45 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-06-09 14:30:01 -0400 |
commit | 0b28d7373562938a9e6f38c259f66082e99cb9a9 (patch) | |
tree | d11b058a75a842d8a05b8a255271e1bd09bdfc25 /drivers/bluetooth | |
parent | 4a77708b055a71bf769a917283a9eba3dcedb017 (diff) |
Bluetooth: Do not ignore errors returned from strict_strtol()
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/btmrvl_debugfs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/bluetooth/btmrvl_debugfs.c b/drivers/bluetooth/btmrvl_debugfs.c index fd6305bf953e..8ecf4c6c2874 100644 --- a/drivers/bluetooth/btmrvl_debugfs.c +++ b/drivers/bluetooth/btmrvl_debugfs.c | |||
@@ -64,6 +64,8 @@ static ssize_t btmrvl_hscfgcmd_write(struct file *file, | |||
64 | return -EFAULT; | 64 | return -EFAULT; |
65 | 65 | ||
66 | ret = strict_strtol(buf, 10, &result); | 66 | ret = strict_strtol(buf, 10, &result); |
67 | if (ret) | ||
68 | return ret; | ||
67 | 69 | ||
68 | priv->btmrvl_dev.hscfgcmd = result; | 70 | priv->btmrvl_dev.hscfgcmd = result; |
69 | 71 | ||
@@ -108,6 +110,8 @@ static ssize_t btmrvl_psmode_write(struct file *file, const char __user *ubuf, | |||
108 | return -EFAULT; | 110 | return -EFAULT; |
109 | 111 | ||
110 | ret = strict_strtol(buf, 10, &result); | 112 | ret = strict_strtol(buf, 10, &result); |
113 | if (ret) | ||
114 | return ret; | ||
111 | 115 | ||
112 | priv->btmrvl_dev.psmode = result; | 116 | priv->btmrvl_dev.psmode = result; |
113 | 117 | ||
@@ -147,6 +151,8 @@ static ssize_t btmrvl_pscmd_write(struct file *file, const char __user *ubuf, | |||
147 | return -EFAULT; | 151 | return -EFAULT; |
148 | 152 | ||
149 | ret = strict_strtol(buf, 10, &result); | 153 | ret = strict_strtol(buf, 10, &result); |
154 | if (ret) | ||
155 | return ret; | ||
150 | 156 | ||
151 | priv->btmrvl_dev.pscmd = result; | 157 | priv->btmrvl_dev.pscmd = result; |
152 | 158 | ||
@@ -191,6 +197,8 @@ static ssize_t btmrvl_gpiogap_write(struct file *file, const char __user *ubuf, | |||
191 | return -EFAULT; | 197 | return -EFAULT; |
192 | 198 | ||
193 | ret = strict_strtol(buf, 16, &result); | 199 | ret = strict_strtol(buf, 16, &result); |
200 | if (ret) | ||
201 | return ret; | ||
194 | 202 | ||
195 | priv->btmrvl_dev.gpio_gap = result; | 203 | priv->btmrvl_dev.gpio_gap = result; |
196 | 204 | ||
@@ -230,6 +238,8 @@ static ssize_t btmrvl_hscmd_write(struct file *file, const char __user *ubuf, | |||
230 | return -EFAULT; | 238 | return -EFAULT; |
231 | 239 | ||
232 | ret = strict_strtol(buf, 10, &result); | 240 | ret = strict_strtol(buf, 10, &result); |
241 | if (ret) | ||
242 | return ret; | ||
233 | 243 | ||
234 | priv->btmrvl_dev.hscmd = result; | 244 | priv->btmrvl_dev.hscmd = result; |
235 | if (priv->btmrvl_dev.hscmd) { | 245 | if (priv->btmrvl_dev.hscmd) { |
@@ -272,6 +282,8 @@ static ssize_t btmrvl_hsmode_write(struct file *file, const char __user *ubuf, | |||
272 | return -EFAULT; | 282 | return -EFAULT; |
273 | 283 | ||
274 | ret = strict_strtol(buf, 10, &result); | 284 | ret = strict_strtol(buf, 10, &result); |
285 | if (ret) | ||
286 | return ret; | ||
275 | 287 | ||
276 | priv->btmrvl_dev.hsmode = result; | 288 | priv->btmrvl_dev.hsmode = result; |
277 | 289 | ||