diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index 62230e05eac1..3f890a6708cd 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -5133,14 +5133,14 @@ static int rt5677_i2c_probe(struct i2c_client *i2c, if (IS_ERR(rt5677->pow_ldo2)) { ret = PTR_ERR(rt5677->pow_ldo2); dev_err(&i2c->dev, "Failed to request POW_LDO2: %d\n", ret); - rt5677->pow_ldo2 = 0; + return ret; } rt5677->reset_pin = devm_gpiod_get_optional(&i2c->dev, "realtek,reset", GPIOD_OUT_HIGH); if (IS_ERR(rt5677->reset_pin)) { ret = PTR_ERR(rt5677->reset_pin); dev_err(&i2c->dev, "Failed to request RESET: %d\n", ret); - rt5677->reset_pin = 0; + return ret; } if (rt5677->pow_ldo2 || rt5677->reset_pin) {