From: Lee Jones <lee.jones@linaro.org>
To: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org,
Krzysztof Kozlowski <k.kozlowski@samsung.com>,
stable@vger.kernel.org, Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [RESEND PATCH] mfd: max77843: Fix max77843_chg_init() return on error
Date: Tue, 22 Sep 2015 22:58:53 +0100 [thread overview]
Message-ID: <20150922215853.GE3442@x1> (raw)
In-Reply-To: <1442838414-3807-1-git-send-email-javier@osg.samsung.com>
On Mon, 21 Sep 2015, Javier Martinez Canillas wrote:
> If i2c_new_dummy() fails in max77843_chg_init(), an PTR_ERR(NULL) is
> returned which is 0. So the function was wrongly returning a success
> value instead of an error code.
>
> Cc: stable@vger.kernel.org # 4.1
> Fixes: c7f585fe46d8 ("mfd: max77843: Add max77843 MFD driver core driver")
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>
> ---
> Changes in the RESEND:
> - Added Krzysztof's Reviewed-by tag.
> - Added a tag for stable.
>
> drivers/mfd/max77843.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
> diff --git a/drivers/mfd/max77843.c b/drivers/mfd/max77843.c
> index c52162ea3d0a..586098f1b233 100644
> --- a/drivers/mfd/max77843.c
> +++ b/drivers/mfd/max77843.c
> @@ -80,7 +80,7 @@ static int max77843_chg_init(struct max77693_dev *max77843)
> if (!max77843->i2c_chg) {
> dev_err(&max77843->i2c->dev,
> "Cannot allocate I2C device for Charger\n");
> - return PTR_ERR(max77843->i2c_chg);
> + return -ENODEV;
> }
> i2c_set_clientdata(max77843->i2c_chg, max77843);
>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
prev parent reply other threads:[~2015-09-22 21:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-21 12:26 [RESEND PATCH] mfd: max77843: Fix max77843_chg_init() return on error Javier Martinez Canillas
2015-09-22 21:58 ` Lee Jones [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=20150922215853.GE3442@x1 \
--to=lee.jones@linaro.org \
--cc=javier@osg.samsung.com \
--cc=k.kozlowski@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox