From: "Gustavo F. Padovan" <padovan@profusion.mobi>
To: David Miller <davem@davemloft.net>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] bluetooth: Do not ignore errors returned from strict_strtol()
Date: Thu, 19 May 2011 23:33:07 -0300 [thread overview]
Message-ID: <20110520023307.GC4888@joana> (raw)
In-Reply-To: <20110519.173745.19153862714606787.davem@davemloft.net>
* David Miller <davem@davemloft.net> [2011-05-19 17:37:45 -0400]:
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
>
> diff --git a/drivers/bluetooth/btmrvl_debugfs.c b/drivers/bluetooth/btmrvl_debugfs.c
> index fd6305b..8ecf4c6 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,
> 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;
Applied, thanks Dave!
--
Gustavo F. Padovan
http://profusion.mobi
prev parent reply other threads:[~2011-05-20 2:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 21:37 [PATCH] bluetooth: Do not ignore errors returned from strict_strtol() David Miller
2011-05-20 2:33 ` Gustavo F. Padovan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110520023307.GC4888@joana \
--to=padovan@profusion.mobi \
--cc=davem@davemloft.net \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.