diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/power/supply/cros_usbpd-charger.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/power/supply/cros_usbpd-charger.c b/drivers/power/supply/cros_usbpd-charger.c index 6cc7c3910e09..ffad9ee03a68 100644 --- a/drivers/power/supply/cros_usbpd-charger.c +++ b/drivers/power/supply/cros_usbpd-charger.c @@ -132,11 +132,8 @@ static int cros_usbpd_charger_get_num_ports(struct charger_data *charger) ret = cros_usbpd_charger_ec_command(charger, 0, EC_CMD_CHARGE_PORT_COUNT, NULL, 0, &resp, sizeof(resp)); - if (ret < 0) { - dev_err(charger->dev, - "Unable to get the number of ports (err:0x%x)\n", ret); + if (ret < 0) return ret; - } return resp.port_count; } @@ -148,11 +145,8 @@ static int cros_usbpd_charger_get_usbpd_num_ports(struct charger_data *charger) ret = cros_usbpd_charger_ec_command(charger, 0, EC_CMD_USB_PD_PORTS, NULL, 0, &resp, sizeof(resp)); - if (ret < 0) { - dev_err(charger->dev, - "Unable to get the number or ports (err:0x%x)\n", ret); + if (ret < 0) return ret; - } return resp.num_ports; } |