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>
This commit is contained in:
parent
0da67bed83
commit
26e7acf315
|
@ -64,6 +64,8 @@ static ssize_t btmrvl_hscfgcmd_write(struct file *file,
|
|||
return -EFAULT;
|
||||
|
||||
ret = strict_strtol(buf, 10, &result);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
priv->btmrvl_dev.hscfgcmd = result;
|
||||
|
||||
|
@ -108,6 +110,8 @@ static ssize_t btmrvl_psmode_write(struct file *file, const char __user *ubuf,
|
|||
return -EFAULT;
|
||||
|
||||
ret = strict_strtol(buf, 10, &result);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
priv->btmrvl_dev.psmode = result;
|
||||
|
||||
|
@ -147,6 +151,8 @@ static ssize_t btmrvl_pscmd_write(struct file *file, const char __user *ubuf,
|
|||
return -EFAULT;
|
||||
|
||||
ret = strict_strtol(buf, 10, &result);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
priv->btmrvl_dev.pscmd = result;
|
||||
|
||||
|
@ -191,6 +197,8 @@ static ssize_t btmrvl_gpiogap_write(struct file *file, const char __user *ubuf,
|
|||
return -EFAULT;
|
||||
|
||||
ret = strict_strtol(buf, 16, &result);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
priv->btmrvl_dev.gpio_gap = result;
|
||||
|
||||
|
@ -230,6 +238,8 @@ static ssize_t btmrvl_hscmd_write(struct file *file, const char __user *ubuf,
|
|||
return -EFAULT;
|
||||
|
||||
ret = strict_strtol(buf, 10, &result);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
priv->btmrvl_dev.hscmd = result;
|
||||
if (priv->btmrvl_dev.hscmd) {
|
||||
|
@ -272,6 +282,8 @@ static ssize_t btmrvl_hsmode_write(struct file *file, const char __user *ubuf,
|
|||
return -EFAULT;
|
||||
|
||||
ret = strict_strtol(buf, 10, &result);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
priv->btmrvl_dev.hsmode = result;
|
||||
|
||||
|
|
Loading…
Reference in New Issue