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:
parent
3a4594e444
commit
17979bdfb7
1 changed files with 1 additions and 1 deletions
|
@ -301,7 +301,7 @@ static int pmic_reg_init(const struct device *dev)
|
|||
/* Do the same cast for current limit ranges */
|
||||
data->current_levels = (struct current_range *)config->current_array;
|
||||
/* 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 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue