Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH] mfd: tps65090: Return proper error if regmap_init_i2c fails

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


axel.lin at gmail

Apr 24, 2012, 6:30 PM

Post #1 of 3 (46 views)
Permalink
[PATCH] mfd: tps65090: Return proper error if regmap_init_i2c fails

Return proper error instead of 0 if regmap_init_i2c fails.

Signed-off-by: Axel Lin <axel.lin [at] gmail>
---
drivers/mfd/tps65090.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c
index 47f802b..da821d9 100644
--- a/drivers/mfd/tps65090.c
+++ b/drivers/mfd/tps65090.c
@@ -286,10 +286,10 @@ static int __devinit tps65090_i2c_probe(struct i2c_client *client,
tps65090->rmap = regmap_init_i2c(tps65090->client,
&tps65090_regmap_config);
if (IS_ERR(tps65090->rmap)) {
- dev_err(&client->dev, "regmap_init failed with err: %ld\n",
- PTR_ERR(tps65090->rmap));
+ ret = PTR_ERR(tps65090->rmap);
+ dev_err(&client->dev, "regmap_init failed with err: %d\n", ret);
goto err_irq_exit;
- };
+ }

ret = mfd_add_devices(tps65090->dev, -1, tps65090s,
ARRAY_SIZE(tps65090s), NULL, 0);
--
1.7.5.4



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


vbyravarasu at nvidia

Apr 24, 2012, 10:28 PM

Post #2 of 3 (48 views)
Permalink
RE: [PATCH] mfd: tps65090: Return proper error if regmap_init_i2c fails [In reply to]

Thanks for the patch.
Acked by: Venu Byravarasu<vbyravarasu [at] nvidia>

> -----Original Message-----
> From: Axel Lin [mailto:axel.lin [at] gmail]
> Sent: Wednesday, April 25, 2012 7:01 AM
> To: linux-kernel [at] vger
> Cc: Samuel Ortiz; Venu Byravarasu
> Subject: [PATCH] mfd: tps65090: Return proper error if regmap_init_i2c fails
>
> Return proper error instead of 0 if regmap_init_i2c fails.
>
> Signed-off-by: Axel Lin <axel.lin [at] gmail>
> ---
> drivers/mfd/tps65090.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c
> index 47f802b..da821d9 100644
> --- a/drivers/mfd/tps65090.c
> +++ b/drivers/mfd/tps65090.c
> @@ -286,10 +286,10 @@ static int __devinit tps65090_i2c_probe(struct
> i2c_client *client,
> tps65090->rmap = regmap_init_i2c(tps65090->client,
> &tps65090_regmap_config);
> if (IS_ERR(tps65090->rmap)) {
> - dev_err(&client->dev, "regmap_init failed with err: %ld\n",
> - PTR_ERR(tps65090->rmap));
> + ret = PTR_ERR(tps65090->rmap);
> + dev_err(&client->dev, "regmap_init failed with err: %d\n", ret);
> goto err_irq_exit;
> - };
> + }
>
> ret = mfd_add_devices(tps65090->dev, -1, tps65090s,
> ARRAY_SIZE(tps65090s), NULL, 0);
> --
> 1.7.5.4
>
>

{.n++%lzwmb맲rzXw{ayʇڙ,jfhzw j:+vwjmzZ+ݢj"!iOzv^m nƊY&


sameo at linux

May 9, 2012, 8:48 AM

Post #3 of 3 (42 views)
Permalink
Re: [PATCH] mfd: tps65090: Return proper error if regmap_init_i2c fails [In reply to]

Hi Axel,

On Wed, Apr 25, 2012 at 09:30:36AM +0800, Axel Lin wrote:
> Return proper error instead of 0 if regmap_init_i2c fails.
>
> Signed-off-by: Axel Lin <axel.lin [at] gmail>
> ---
> drivers/mfd/tps65090.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
Patch applied, thanks.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.