Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1230988 > unrolled thread
| Started by | Lee Jones <lee.jones@linaro.org> |
|---|---|
| First post | 2015-09-23 00:00 +0200 |
| Last post | 2015-09-23 00:00 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [RESEND PATCH] mfd: max77843: Fix max77843_chg_init() return on error Lee Jones <lee.jones@linaro.org> - 2015-09-23 00:00 +0200
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2015-09-23 00:00 +0200 |
| Subject | Re: [RESEND PATCH] mfd: max77843: Fix max77843_chg_init() return on error |
| Message-ID | <qbDLs-16C-3@gated-at.bofh.it> |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web