public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: ab8500-ext: Don't update info->is_enabled if write to register fails
@ 2013-04-02 12:56 Axel Lin
  2013-04-02 13:08 ` Bengt Jönsson
  2013-04-02 22:04 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2013-04-02 12:56 UTC (permalink / raw)
  To: Mark Brown
  Cc: Bengt Jonsson, Lee Jones, Yvan FILLION, Liam Girdwood,
	linux-kernel

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/ab8500-ext.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/ab8500-ext.c b/drivers/regulator/ab8500-ext.c
index 21b9bfb..7923e82 100644
--- a/drivers/regulator/ab8500-ext.c
+++ b/drivers/regulator/ab8500-ext.c
@@ -72,9 +72,11 @@ static int enable(struct ab8500_ext_regulator_info *info, u8 *regval)
 	ret = abx500_mask_and_set_register_interruptible(info->dev,
 		info->update_bank, info->update_reg,
 		info->update_mask, *regval);
-	if (ret < 0)
+	if (ret < 0) {
 		dev_err(rdev_get_dev(info->rdev),
 			"couldn't set enable bits for regulator\n");
+		return ret;
+	}
 
 	info->is_enabled = true;
 
@@ -117,9 +119,11 @@ static int disable(struct ab8500_ext_regulator_info *info, u8 *regval)
 	ret = abx500_mask_and_set_register_interruptible(info->dev,
 		info->update_bank, info->update_reg,
 		info->update_mask, *regval);
-	if (ret < 0)
+	if (ret < 0) {
 		dev_err(rdev_get_dev(info->rdev),
 			"couldn't set disable bits for regulator\n");
+		return ret;
+	}
 
 	info->is_enabled = false;
 
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] regulator: ab8500-ext: Don't update info->is_enabled if write to register fails
  2013-04-02 12:56 [PATCH] regulator: ab8500-ext: Don't update info->is_enabled if write to register fails Axel Lin
@ 2013-04-02 13:08 ` Bengt Jönsson
  2013-04-02 22:04 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Bengt Jönsson @ 2013-04-02 13:08 UTC (permalink / raw)
  To: Axel Lin
  Cc: Mark Brown, Lee Jones, Yvan FILLION, Liam Girdwood,
	linux-kernel@vger.kernel.org

On 04/02/2013 02:56 PM, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
> ---
>   drivers/regulator/ab8500-ext.c |    8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/regulator/ab8500-ext.c b/drivers/regulator/ab8500-ext.c
> index 21b9bfb..7923e82 100644
> --- a/drivers/regulator/ab8500-ext.c
> +++ b/drivers/regulator/ab8500-ext.c
> @@ -72,9 +72,11 @@ static int enable(struct ab8500_ext_regulator_info *info, u8 *regval)
>   	ret = abx500_mask_and_set_register_interruptible(info->dev,
>   		info->update_bank, info->update_reg,
>   		info->update_mask, *regval);
> -	if (ret < 0)
> +	if (ret < 0) {
>   		dev_err(rdev_get_dev(info->rdev),
>   			"couldn't set enable bits for regulator\n");
> +		return ret;
> +	}
>   
>   	info->is_enabled = true;
>   
> @@ -117,9 +119,11 @@ static int disable(struct ab8500_ext_regulator_info *info, u8 *regval)
>   	ret = abx500_mask_and_set_register_interruptible(info->dev,
>   		info->update_bank, info->update_reg,
>   		info->update_mask, *regval);
> -	if (ret < 0)
> +	if (ret < 0) {
>   		dev_err(rdev_get_dev(info->rdev),
>   			"couldn't set disable bits for regulator\n");
> +		return ret;
> +	}
>   
>   	info->is_enabled = false;
>   


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] regulator: ab8500-ext: Don't update info->is_enabled if write to register fails
  2013-04-02 12:56 [PATCH] regulator: ab8500-ext: Don't update info->is_enabled if write to register fails Axel Lin
  2013-04-02 13:08 ` Bengt Jönsson
@ 2013-04-02 22:04 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-04-02 22:04 UTC (permalink / raw)
  To: Axel Lin
  Cc: Bengt Jonsson, Lee Jones, Yvan FILLION, Liam Girdwood,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 124 bytes --]

On Tue, Apr 02, 2013 at 08:56:16PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-02 22:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-02 12:56 [PATCH] regulator: ab8500-ext: Don't update info->is_enabled if write to register fails Axel Lin
2013-04-02 13:08 ` Bengt Jönsson
2013-04-02 22:04 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox