drivers: regulator: pmic: remove unneeded NULL check

Remove unneeded NULL check in pmic init function. Not required as
device_is_ready() will handle NULL device structs.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
Daniel DeGrasse 2022-01-25 15:12:13 -06:00 committed by Carles Cufí
commit 17979bdfb7

View file

@ -301,7 +301,7 @@ static int pmic_reg_init(const struct device *dev)
/* Do the same cast for current limit ranges */ /* Do the same cast for current limit ranges */
data->current_levels = (struct current_range *)config->current_array; data->current_levels = (struct current_range *)config->current_array;
/* Check to verify we have a valid I2C device */ /* Check to verify we have a valid I2C device */
if (config->i2c_dev == NULL || !device_is_ready(config->i2c_dev)) { if (!device_is_ready(config->i2c_dev)) {
return -ENODEV; return -ENODEV;
} }
return 0; return 0;