Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp592406iog; Mon, 13 Jun 2022 08:45:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwn8onA9wWRLGG9Ojpdqavt4uVg96ChUxqsxXrV5YAzmV6tW4d1nofaVSnaclDlPs0Pful/ X-Received: by 2002:a63:b24a:0:b0:3db:b454:b5a with SMTP id t10-20020a63b24a000000b003dbb4540b5amr231233pgo.312.1655135155959; Mon, 13 Jun 2022 08:45:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655135155; cv=none; d=google.com; s=arc-20160816; b=TWq5jOlMP2j9IUOwLBxXJycLsD4mncOu56KF9MDTqRlrBXf/KPNUpcAYSBA56Ctj1Q 5wBuO0n0YhikhRZDi+6tP9rdzV65Kl17xmiCByL6kTsItzMOW4pyvHauci/JGwleenpI IAEE0S/Balufj6byNgGu33UCLHsAtqE39RzX3igUav+q1EYHX6zXBCzh4nlAzWhQ9JBC lErnr0YekraFsost7jMdbFGypPN9im5c1rkHA6hbCZvUQyFU1031EZ5D9bwJ6bMyYCZv TvvhdRn6C3gi8utOgxc1So/slJh7qjUkuhJD8AD8qKjevsR08Gi7PGCd++VR9mOX9ojv ufcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+474IEuerzKO0dSBpQkribdzJBtZd85KzQ3NtcDhK/0=; b=AwTn4yHAB0m/2ZxjmbslaIVEJ39sHJqVo1D15KMrMOkgf0Dpomjn1KoVdc8QCVTN3m Kfun4VPs6SY+6cHSFY23erkcOiM4qYN8XHYtCSM1RWQFis56voQjkPjylMCGy8HxGS0Q 3FgPF9sP08Yk5NRcGMdLtXaBTRH4YZ3g+Ms8Qs9GdGQQqcXxpnyLBtiIQLQjIM4lBGEF 2MTTaC4r08mVtw4YnK6VIG6T7U4bwL8KyPhrzAn9XLLH0jEQ1i/0liZcCfZzmJ4WWr0H d9gC7khs/nIxNNa5KVxkaFsKU7IAPsMwv33r6C0YCVx8JSzKw0F2HARNzq7knzB8IXvF cJVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KHy7DKnj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c12-20020a655a8c000000b003fd08533f47si9839337pgt.548.2022.06.13.08.45.43; Mon, 13 Jun 2022 08:45:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KHy7DKnj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352070AbiFMLK1 (ORCPT + 99 others); Mon, 13 Jun 2022 07:10:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351882AbiFMLFL (ORCPT ); Mon, 13 Jun 2022 07:05:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29138272; Mon, 13 Jun 2022 03:34:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B9E8960F9A; Mon, 13 Jun 2022 10:34:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CACE2C34114; Mon, 13 Jun 2022 10:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655116470; bh=JzLTZvIxI/bUbu0r41iCl9hj9nz0AwpHT9/b+qTUprg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KHy7DKnj4cfLGEED/a1dqnAfNW8qqTYu4Nz5AeEwuuDAYFYViYTy6WfTKa4LGemIw w4A1o5HbYF13QuD5/hcDjWy0sa3td18cqO5lVkW8nE5GLtv96iHsku+VC3laMhInh4 t7Ky3XngSUrXkPqKzsgzApSZb90pNO/kwdZaj1eM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lucas Stach , Robert Foss , Sasha Levin Subject: [PATCH 5.4 083/411] drm/bridge: adv7511: clean up CEC adapter when probe fails Date: Mon, 13 Jun 2022 12:05:56 +0200 Message-Id: <20220613094931.170533764@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094928.482772422@linuxfoundation.org> References: <20220613094928.482772422@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lucas Stach [ 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 Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220321104705.2804423-1-l.stach@pengutronix.de Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index 9e13e466e72c..e7bf32f234d7 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c @@ -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); -- 2.35.1