Commit 17979bdf authored by Daniel DeGrasse's avatar Daniel DeGrasse Committed by Carles Cufi
Browse files

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: default avatarDaniel DeGrasse <daniel.degrasse@nxp.com>
parent 3a4594e4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;