Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp888045pxb; Wed, 6 Apr 2022 03:17:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8xFmi6KhOJCnPOV5c+H2Zs2VJT0QZCfSesduz0zmw9qRwEiMW/4W3ERrFDnDndwHKIBou X-Received: by 2002:a05:6a00:2990:b0:4fa:dacf:2e3 with SMTP id cj16-20020a056a00299000b004fadacf02e3mr8090995pfb.67.1649240268238; Wed, 06 Apr 2022 03:17:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649240268; cv=none; d=google.com; s=arc-20160816; b=mdYZk/9jvD0SpHlI/VjPFVUpF5V+kHmDQ3GSx+3LXJfwFemo8Y7MBInjB2FTUV6E3s TLxRW23oj04jldl7rD8C70dWdNWMzrs024/7e3U5bgVrKxKgxgN5HerWyn6gsM5r6W75 1uQY10XJMHSp0pEDDCkif8kdHwokAUukSTQb0HDvCeanGLs+07mGz7rbIGo80lyE4vn4 Yye46wkcf2o218d5cXu1nradrLjNpPW1zoQfHqmVPCxCiViBfHJYNzYtS11pWyRvAxti LdXmxEKGQAn/6B2/qihWuSMuAUGU/GpisRLD6hO0IGK6fLR5VM5kNLDBMCC19svhVqu5 31hg== 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=2R9f61NiXG+6WIMoGabwcTc9Yw9NDp2PYNCHSPdp8e8=; b=AQU0Hngdluv058u1pHwrP/eKd4dxwT9Uh44MfpivEGg4TIdqnCCLfgrPfXNBV+Iz37 ZOshQpvYty4fFN74U5i1VLNcphh8TCaNr1hsyQmaOxOQq0B/Y6TYFEcS53Bbgp1kLXmi p+TRKUNpk4K/U25BvnIOm+i6bxQbqmBUFwL2Y8biE8w+uUUlnPuW2Mnm+alnbrgGVkqN 3nMjYjjB6tFPg6fOsTCDTe4YX/5R7JqIe5260ag5X8yF0xrBZgb2vnAX1fj9hsUGrktA nk3nox7XyS8gNkFpxsSVHwjIfymZdNjoqN+FQYNZY+7BYyq4/7xMtBqKLNfbRNoICWW7 OAWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fb4t4XIk; 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 n7-20020a635c47000000b003816043ef09si12829912pgm.254.2022.04.06.03.17.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 03:17:48 -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=fb4t4XIk; 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 7F3F44BB324; Wed, 6 Apr 2022 01:44:26 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1451553AbiDEWaJ (ORCPT + 99 others); Tue, 5 Apr 2022 18:30:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349178AbiDEJtY (ORCPT ); Tue, 5 Apr 2022 05:49:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A509DEED; Tue, 5 Apr 2022 02:42:16 -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 ams.source.kernel.org (Postfix) with ESMTPS id B641BB81B7F; Tue, 5 Apr 2022 09:42:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23C9DC385A1; Tue, 5 Apr 2022 09:42:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151733; bh=Z9o8gaYS56UaYl5hI66rYbD2VLJumMbKcvklW95+7cY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fb4t4XIkC3pi1vkdHdNEOaMB7ApehHf/KyY0mZS0StdRrzSQm1xWyR7WjHurXgNYj Zkbx7CkrpcFDSGt/xA3+HhG5PriwucALLePuuveKnL7MEu+4JsAGaBSvtQ1OU3x86g B4WH+G7dq8kObuEsH7hFhz7O3z9cAPdms8tTd5Sk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Thierry Reding , Sasha Levin Subject: [PATCH 5.15 495/913] drm/tegra: Fix reference leak in tegra_dsi_ganged_probe Date: Tue, 5 Apr 2022 09:25:57 +0200 Message-Id: <20220405070354.692736205@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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=-2.0 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=no 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: Miaoqian Lin [ Upstream commit 221e3638feb8bc42143833c9a704fa89b6c366bb ] The reference taken by 'of_find_device_by_node()' must be released when not needed anymore. Add put_device() call to fix this. Fixes: e94236cde4d5 ("drm/tegra: dsi: Add ganged mode support") Signed-off-by: Miaoqian Lin Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin --- drivers/gpu/drm/tegra/dsi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c index f46d377f0c30..de1333dc0d86 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c @@ -1538,8 +1538,10 @@ static int tegra_dsi_ganged_probe(struct tegra_dsi *dsi) dsi->slave = platform_get_drvdata(gangster); of_node_put(np); - if (!dsi->slave) + if (!dsi->slave) { + put_device(&gangster->dev); return -EPROBE_DEFER; + } dsi->slave->master = dsi; } -- 2.34.1