Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2138441iof; Tue, 7 Jun 2022 21:02:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxk4Bx/rky85mzezssTpDEBHaGyB+gyGDuVfZRPqiygY+b188yaHxdviUTp2wXnXTddR/94 X-Received: by 2002:a65:694d:0:b0:3fa:34df:cdc6 with SMTP id w13-20020a65694d000000b003fa34dfcdc6mr28096074pgq.439.1654660961778; Tue, 07 Jun 2022 21:02:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654660961; cv=none; d=google.com; s=arc-20160816; b=Px8xmYckfywoNt1EQOh99nskz9O9gR1uO2zZkon5lUdq9gTu1fS2xz1FlbPjz19pjn Xy4zvqocJcnydv66iXo9NxC+AWtPN/QFre48X/7/7sKUlSriYH4KAqCTBrBs/LfvcAV0 2N+qMu5EsHCNCqUh6Bp6KfeJkmnwcuGXEN3F9gXgQ0ySaEjajbpY/JjimYO/KhPZopZJ QMnGsa52eRHH7N6l9BXYE7yCKGYI33QPJb/oF8v9fMZQzslz2Zq8Q/RWCxuOAOmvht45 ESjIEOFGg43X0HCeUkDtRyYPTSyNgeL/iKsubl3/eEdW1uoL1pcaBIMFwXgMSukIeRPW 7J3Q== 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=IYJY/vAy9xqZ2nUfpM00lVs/q5yoUuL6Reh/YDDC45s=; b=VGgioKyoNQ2o/HhKK0mOxgR5XdinJ4SPgKt7QXu72fzx273Liji6ix5whE2q4VqdDq TZZ9K9JLiRL+7iKitbn8BXlh/oIcJaf6f6Lnm0IsL/jvddkad2WEI3/x+a9+HfTJ//3a KLqIOPQX+YKQ+dwT/YUrpFV/qunRJ871oCl2PNFLSFg2F0zKgOyMzMDfzpzdHZp1LHsn SvrLdDZjtnnjiWycBeFMvcU8bShkwelnMIFXTTZAphqsgv+8UqK4Zl1QY0oVpyrT+eE/ /ZuPqqjnd2gWqC2YwMf/j3iXPFfHx1hjZ2ItFSXYd3SSR5g6SCCO2d90WZDrxbdQpuXX BG6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jB+UyYKB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j9-20020a170903024900b001544c952660si30644649plh.353.2022.06.07.21.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:02:41 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jB+UyYKB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 80ECA1E44D4; Tue, 7 Jun 2022 20:27:31 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381955AbiFGWYa (ORCPT + 99 others); Tue, 7 Jun 2022 18:24:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380991AbiFGVRN (ORCPT ); Tue, 7 Jun 2022 17:17:13 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EEAA14C740; Tue, 7 Jun 2022 11:58:12 -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 sin.source.kernel.org (Postfix) with ESMTPS id A7652CE244E; Tue, 7 Jun 2022 18:58:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA4FAC36B0F; Tue, 7 Jun 2022 18:58:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628289; bh=/4xJbKpGBjGBVK3DsRpkwmnlySQCxQNQYds2CMdFL9Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jB+UyYKBmPe+iCfOatBIe/cyAirPI5G5Aml647n6zzZ/OrmNAz9dIZznC3YMTegdm uuzO+IkL/wyNAjt6iUcRrrJ7Fw80N17U88OkcmJROENnIVSjOaxE3eWdRfWAQzEjib /MV/xExhfKkT1/rsjoW74qZ6hk4WcMoRcafd6XrM= 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.18 274/879] drm/bridge: adv7511: clean up CEC adapter when probe fails Date: Tue, 7 Jun 2022 18:56:32 +0200 Message-Id: <20220607165010.803130153@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@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=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 005bf18682ff..668dcefbae17 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c @@ -1313,6 +1313,7 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id) adv7511_audio_exit(adv7511); drm_bridge_remove(&adv7511->bridge); err_unregister_cec: + cec_unregister_adapter(adv7511->cec_adap); i2c_unregister_device(adv7511->i2c_cec); clk_disable_unprepare(adv7511->cec_clk); err_i2c_unregister_packet: -- 2.35.1