diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c index a3f80ca4a6e3..8db6a926ea07 100644 --- a/drivers/extcon/extcon-max77843.c +++ b/drivers/extcon/extcon-max77843.c @@ -715,7 +715,7 @@ static int max77843_init_muic_regmap(struct max77843 *max77843) if (!max77843->i2c_muic) { dev_err(&max77843->i2c->dev, "Cannot allocate I2C device for MUIC\n"); - return PTR_ERR(max77843->i2c_muic); + return -ENOMEM; } i2c_set_clientdata(max77843->i2c_muic, max77843);