Commit d72e3dc7 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Chanwoo Choi

extcon: axp288: Add missed error check

It seems from the very beginning the error check has been missed
in axp288_extcon_log_rsi(). Add it here.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent 005ad187
...@@ -135,6 +135,11 @@ static void axp288_extcon_log_rsi(struct axp288_extcon_info *info) ...@@ -135,6 +135,11 @@ static void axp288_extcon_log_rsi(struct axp288_extcon_info *info)
int ret; int ret;
ret = regmap_read(info->regmap, AXP288_PS_BOOT_REASON_REG, &val); ret = regmap_read(info->regmap, AXP288_PS_BOOT_REASON_REG, &val);
if (ret < 0) {
dev_err(info->dev, "failed to read reset source indicator\n");
return;
}
for (i = 0, rsi = axp288_pwr_up_down_info; *rsi; rsi++, i++) { for (i = 0, rsi = axp288_pwr_up_down_info; *rsi; rsi++, i++) {
if (val & BIT(i)) { if (val & BIT(i)) {
dev_dbg(info->dev, "%s\n", *rsi); dev_dbg(info->dev, "%s\n", *rsi);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment