From: Guenter Roeck <guenter.roeck@ericsson.com>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: "lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>,
Jean Delvare <khali@linux-fr.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] hwmon: (SHT15) fix bad error code
Date: Thu, 26 Jan 2012 13:39:00 -0800 [thread overview]
Message-ID: <20120126213900.GA23534@ericsson.com> (raw)
In-Reply-To: <1327611540-21023-1-git-send-email-vivien.didelot@savoirfairelinux.com>
On Thu, Jan 26, 2012 at 03:59:00PM -0500, Vivien Didelot wrote:
> When no platform data was supplied, returned error code was 0.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
> drivers/hwmon/sht15.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
> index fe4104c..5357925 100644
> --- a/drivers/hwmon/sht15.c
> +++ b/drivers/hwmon/sht15.c
> @@ -883,7 +883,7 @@ static int sht15_invalidate_voltage(struct notifier_block *nb,
>
> static int __devinit sht15_probe(struct platform_device *pdev)
> {
> - int ret = 0;
> + int ret;
> struct sht15_data *data = kzalloc(sizeof(*data), GFP_KERNEL);
> u8 status = 0;
>
> @@ -901,6 +901,7 @@ static int __devinit sht15_probe(struct platform_device *pdev)
> init_waitqueue_head(&data->wait_queue);
>
> if (pdev->dev.platform_data == NULL) {
> + ret = -EINVAL;
> dev_err(&pdev->dev, "no platform data supplied\n");
> goto err_free_data;
> }
> --
> 1.7.6.5
>
Good catch. Applied.
Thanks,
Guenter
prev parent reply other threads:[~2012-01-26 21:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-26 20:59 [PATCH] hwmon: (SHT15) fix bad error code Vivien Didelot
2012-01-26 21:39 ` Guenter Roeck [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=20120126213900.GA23534@ericsson.com \
--to=guenter.roeck@ericsson.com \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=vivien.didelot@savoirfairelinux.com \
/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 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).