mirror of
https://github.com/torvalds/linux.git
synced 2026-02-04 15:28:49 +08:00
power: supply: axp20x_usb_power: Add missing check in axp20x_usb_power_probe
There are two regmap_update_bits() calls but only one of them has return value check, which is odd. Add a return value check and terminate the execution flow on failure just like the other call. Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
committed by
Sebastian Reichel
parent
3282634105
commit
17e499a7d6
@@ -614,8 +614,10 @@ static int axp20x_usb_power_probe(struct platform_device *pdev)
|
||||
|
||||
if (power->axp20x_id == AXP813_ID) {
|
||||
/* Enable USB Battery Charging specification detection */
|
||||
regmap_update_bits(axp20x->regmap, AXP288_BC_GLOBAL,
|
||||
ret = regmap_update_bits(axp20x->regmap, AXP288_BC_GLOBAL,
|
||||
AXP813_BC_EN, AXP813_BC_EN);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
psy_cfg.of_node = pdev->dev.of_node;
|
||||
|
||||
Reference in New Issue
Block a user