]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/bridge: adv7511: clean up CEC adapter when probe fails
authorLucas Stach <l.stach@pengutronix.de>
Mon, 21 Mar 2022 10:47:05 +0000 (11:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 14:59:19 +0000 (16:59 +0200)
[ Upstream commit 7ed2b0dabf7a22874cb30f8878df239ef638eb53 ]

When the probe routine fails we also need to clean up the
CEC adapter registered in adv7511_cec_init().

Fixes: 3b1b975003e4 ("drm: adv7511/33: add HDMI CEC support")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220321104705.2804423-1-l.stach@pengutronix.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c

index e7ddd3e3db920939d8871e255a4659aab56d7ddd..b6e7cc9082ca09a56464e8c106c0c96d489fa12f 100644 (file)
@@ -1225,6 +1225,7 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
        return 0;
 
 err_unregister_cec:
+       cec_unregister_adapter(adv7511->cec_adap);
        i2c_unregister_device(adv7511->i2c_cec);
        if (adv7511->cec_clk)
                clk_disable_unprepare(adv7511->cec_clk);