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:
Tom Rini
2025-08-29 16:44:50 -06:00
2 changed files with 2 additions and 4 deletions

View File

@@ -248,8 +248,6 @@ int axp_init(void)
if (!(axp_chip_id == 0x51))
return -ENODEV;
else
return ret;
return 0;
}

View File

@@ -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: