devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] ab8500-charger: we print an unintended error message
@ 2013-08-27  1:19 Dan Carpenter
  2013-08-28  1:13 ` Anton Vorontsov
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-08-27  1:19 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: David Woodhouse, Grant Likely, Rob Herring, devicetree,
	kernel-janitors

There is a missing break statement here, so we print an error message
that the USB type is invalid.  The original code still works fine
though except for the error message.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c
index f098fda..a4c4a10 100644
--- a/drivers/power/ab8500_charger.c
+++ b/drivers/power/ab8500_charger.c
@@ -774,6 +774,7 @@ static int ab8500_charger_max_usb_curr(struct ab8500_charger *di,
 		di->max_usb_in_curr.usb_type_max = USB_CH_IP_CUR_LVL_0P5;
 		dev_dbg(di->dev, "USB Type - 0x%02x MaxCurr: %d", link_status,
 				di->max_usb_in_curr.usb_type_max);
+		break;
 	case USB_STAT_NOT_VALID_LINK:
 		dev_err(di->dev, "USB Type invalid - try charging anyway\n");
 		di->max_usb_in_curr.usb_type_max = USB_CH_IP_CUR_LVL_0P5;

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

* Re: [patch] ab8500-charger: we print an unintended error message
  2013-08-27  1:19 [patch] ab8500-charger: we print an unintended error message Dan Carpenter
@ 2013-08-28  1:13 ` Anton Vorontsov
  0 siblings, 0 replies; 2+ messages in thread
From: Anton Vorontsov @ 2013-08-28  1:13 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: David Woodhouse, Grant Likely, Rob Herring, devicetree,
	kernel-janitors

On Tue, Aug 27, 2013 at 04:19:42AM +0300, Dan Carpenter wrote:
> There is a missing break statement here, so we print an error message
> that the USB type is invalid.  The original code still works fine
> though except for the error message.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied, thanks a lot!

Anton

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

end of thread, other threads:[~2013-08-28  1:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27  1:19 [patch] ab8500-charger: we print an unintended error message Dan Carpenter
2013-08-28  1:13 ` Anton Vorontsov

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).