Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ab8500-charger: We print an unintended error message

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>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>

authored by

Dan Carpenter and committed by
Anton Vorontsov
ed5243f8 68f429d5

+1
+1
drivers/power/ab8500_charger.c
··· 774 774 di->max_usb_in_curr.usb_type_max = USB_CH_IP_CUR_LVL_0P5; 775 775 dev_dbg(di->dev, "USB Type - 0x%02x MaxCurr: %d", link_status, 776 776 di->max_usb_in_curr.usb_type_max); 777 + break; 777 778 case USB_STAT_NOT_VALID_LINK: 778 779 dev_err(di->dev, "USB Type invalid - try charging anyway\n"); 779 780 di->max_usb_in_curr.usb_type_max = USB_CH_IP_CUR_LVL_0P5;