driver: regulator: npm1300: fix build warning

regulator_npm1300_init() generated uninitialized variable warning.
Fix this by being consistent in the error checking in underlying function.

Signed-off-by: Audun Korneliussen <audun.korneliussen@nordicsemi.no>
This commit is contained in:
Audun Korneliussen 2024-10-23 08:44:58 +02:00 committed by Maureen Helm
parent b9058e8d18
commit 7da4f4d9cd
1 changed files with 1 additions and 1 deletions

View File

@ -533,7 +533,7 @@ static int get_enabled_reg(const struct device *dev, uint8_t base, uint8_t offse
int ret = mfd_npm1300_reg_read(config->mfd, base, offset, &data); int ret = mfd_npm1300_reg_read(config->mfd, base, offset, &data);
if (ret != 0) { if (ret < 0) {
return ret; return ret;
} }