forked from OERV-BSP/u-boot
Merge patch series "power: Address two Smatch reported issues"
Andrew Goodbody <andrew.goodbody@linaro.org> says: Smatch reported issues with two power drivers due to redundant code and an unitialised variable. Link: https://lore.kernel.org/r/20250807-power_misc-v1-0-2ac672f15461@linaro.org
This commit is contained in:
@@ -248,8 +248,6 @@ int axp_init(void)
|
||||
|
||||
if (!(axp_chip_id == 0x51))
|
||||
return -ENODEV;
|
||||
else
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val)
|
||||
{
|
||||
unsigned char buf[4] = { 0 };
|
||||
u32 ret_val = 0;
|
||||
int ret;
|
||||
int __maybe_unused ret;
|
||||
|
||||
if (check_reg(p, reg))
|
||||
return -EINVAL;
|
||||
@@ -91,9 +91,9 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val)
|
||||
return -ENXIO;
|
||||
}
|
||||
ret = dm_i2c_read(dev, reg, buf, pmic_i2c_tx_num);
|
||||
#endif
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
switch (pmic_i2c_tx_num) {
|
||||
case 3:
|
||||
|
||||
Reference in New Issue
Block a user