Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp650563pxb; Tue, 5 Apr 2022 17:19:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJdYIJTxQRHflByM59V/2oac3begPgV19YI+Y/e8bS2wEoBrXNYQSlrIwKUA3su7mcfzEf X-Received: by 2002:a17:907:3f86:b0:6db:b745:f761 with SMTP id hr6-20020a1709073f8600b006dbb745f761mr5815915ejc.610.1649204291638; Tue, 05 Apr 2022 17:18:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649204291; cv=none; d=google.com; s=arc-20160816; b=qPEe1BwP1Tb4MJPqGeBGEVE4B8+V9w2KFENdtldep28ZEoYpUV0+XLvtRYcVrJ+15a baI1u0nxrlrsfEnhmFZ+yhlOFpDy+xFzqTdX8eOT1m67yiJQ0iaS2fr7XrhOcUPMWgPm geCqktpsdaulcOCOaBQFn1RlhRJziqbYcgRiMYyZwOtIxyAmNhvcHzy7Ct7CSERbAvZY 240nWjJV7X+Grpcklv2nQLPNt4DvUoSWRRTEJDbt0/0XrUCOFAsuf+MSmIigx6yahx83 mHb7CkmhUbketwKHPufuMJKMJZEnKW35YeV1jKrp0hNoS5VnGFkfx8ChcFhlbyMeWAbm iaSw== 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=dLv46ueGJAcghWWZowWcBaTLrQKCqxk8IR7+p45sbRCDq8yYlQ4Jinkcf46AxSR3rT R5OiGm4/oKXJ1owCTzDh16xsMIe25P1616W/oIS80ZIoLjWJbZEwyO65qbVnILUF+2A4 5YmV55KlmA0220KOD538IY65iAYWCFO97x+s9dvLO4p8njhawg9n24sSYF+gydZE4Kng bwJwJiwQLMZpp32fVoEgZNBbyMJ9rsq7qP0bQGdaHgEf7jJ0MGEO0eJZY0Fdm9GeNfsB aFdGOcHjSl8cOr889Xqm2ADoKAqwuD/+pT27jCqTJL3j4pB7rLfhWTWiJKngnUcdHnOi tR4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=t8FKc5wi; 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 la20-20020a170907781400b006df76385ec8si9893151ejc.872.2022.04.05.17.17.46; Tue, 05 Apr 2022 17:18:11 -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=t8FKc5wi; 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 S1355034AbiDEMmi (ORCPT + 99 others); Tue, 5 Apr 2022 08:42:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241805AbiDEJHV (ORCPT ); Tue, 5 Apr 2022 05:07:21 -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 083E64B1F7; Tue, 5 Apr 2022 01:56:39 -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 59E57B81C6C; Tue, 5 Apr 2022 08:56:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8FC8C385A0; Tue, 5 Apr 2022 08:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148996; bh=Z9o8gaYS56UaYl5hI66rYbD2VLJumMbKcvklW95+7cY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t8FKc5wiGdDC9nbgLeFUJnhRKEEQbqD//dzybOv9W7/XGMgf+gWBi3HHlY4djtc5c Yd/6TZh0NCNX7zrBqfHwaTa8kaCBrcSEDab82qZUkbuVwzBO9c7wQdmWRhBI9kbX1o j0E1+wBrHbJjm0MjEjC71S+N2X20FkNBdaQCX1ag= 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.16 0549/1017] drm/tegra: Fix reference leak in tegra_dsi_ganged_probe Date: Tue, 5 Apr 2022 09:24:22 +0200 Message-Id: <20220405070410.581332758@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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=-7.1 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: 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