Message ID | 1510873179-20786-1-git-send-email-john.stultz@linaro.org |
---|---|
State | New |
Headers | show |
Series | [RFC] drm: adv7511/33: Fix adv7511_cec_init() failure handling | expand |
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index 0e14f15..939c3b9 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c @@ -1203,12 +1203,12 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id) #ifdef CONFIG_DRM_I2C_ADV7511_CEC ret = adv7511_cec_init(dev, adv7511, offset); - if (ret) - goto err_unregister_cec; #else - regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL + offset, - ADV7511_CEC_CTRL_POWER_DOWN); + ret = 1; #endif + if (ret) + regmap_write(adv7511->regmap, ADV7511_REG_CEC_CTRL + offset, + ADV7511_CEC_CTRL_POWER_DOWN); return 0;