From patchwork Mon Aug 26 15:08:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13778028 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6843AC5321D for ; Mon, 26 Aug 2024 15:09:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Qq3MT2U3Bii1oMqcjLAXejFqk1AKEOqI5iAx/L7MuJo=; b=yhrcappsMs1Yyzhu35wXYvCdSZ 9ddCBkiv4FvQkonEcrl5QdKmZFW0hwUbn+koWJG0kBjZ3CyouJ6dREdKEE+B4UpD1nw1YWG7y66YY uIMDeolJdz4XLL45QzJtJP6P9u0TvPenE3jJUvI8nEnQ3fnFhkwVjjxtSNWFfe3k99UcIKYr/RyZs eMcqwWPiWRDWYj/Q1H6mFhbRFRaaBvZTD2CTm0B9sv8UkAMwesCyEQnr9kFxNh2o0789cgO2JdcKe doBJ1dwbjvbj8cGzRzRG57n4jlOa7IAz4sa6J9XKTUs19fGxsql6T8+6zB/UEU3sBSRSe9suUDYna VYySsA9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sibLT-00000007lFA-2Toa; Mon, 26 Aug 2024 15:09:27 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sibKf-00000007l0a-0FFO for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2024 15:08:38 +0000 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3718d1f5913so99951f8f.1 for ; Mon, 26 Aug 2024 08:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724684915; x=1725289715; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Qq3MT2U3Bii1oMqcjLAXejFqk1AKEOqI5iAx/L7MuJo=; b=bsRl0hpqD1MiYHFiQZx6RzUJMzwZwBDiF7joVOnGJhri9EQ3cSYZdXMXGc8zg7NLyQ E8pOvR3wV+DYDFKMGV8Pkoo6jSDrW0CK9xQBZGbb7rSZ1P1AfzDYOC1Lm6AleWeBr1oy 4WFbczKxwg6VqTdeFlWBJkVcmp2cl+gp/TvZmRAon05ZSm8NUC0Wg+0V2LWlzycQ7DiQ 7dlt6ckW2voAA0eRn0q4yXi7+h6W5ojta1QmD5Jig/nJiuFCNRbfcR2UHxAJWuGaTjwD MB5QBSP6zhN8tGrc6zMTKmW9EUVUPei2KkN1DxZyHusMH4XF8fHvFjfZSn4Y0cqEKuAE 3eBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724684915; x=1725289715; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Qq3MT2U3Bii1oMqcjLAXejFqk1AKEOqI5iAx/L7MuJo=; b=vbll5t9ad66kx1nG1C1/6V9idGznLsBB6p4evd3glX3T50yzN24BwS5xiloGALtwZg PqJKVrv6tA5odV9X7d4TT8GMLa57zrRXFYgFMOx8T6STj1fmHtWb66nfoTADuxIuRZjP 0BFNDtkOI/PotHYshQVBc91dWVqK6WRPHSvhTXuQmkLpSUk4vmZWQZOJZWEZ2K1aQqyg GR9Rx60XEhiP4aG2wutS5lG97WMG8DBdqdFuSmp/a4KrW5WXVPBbiJP7ymoCLVehePBZ uJD5F0K8a5d5+/wpn8KmPuWpX4b0Sv5Xk1gB0lqW4hxuo8hBio2S7MCcCFP8xxxDKGpV 2OSQ== X-Forwarded-Encrypted: i=1; AJvYcCWirR7PXQvOvfERi883jOfdaUnlHkLsqYy1Q6KiqbiAPf0DVHb+J3fL/a0+CXvI2HfM+P6GmV1XrOwseLbiXWls@lists.infradead.org X-Gm-Message-State: AOJu0YxEnnjlaC0dDAULMy/jp5n0mlcnlPzUzPnSe0r9Kl2W33Hsu+RG rkACj1BZiyYF3fSilDZtZm9tkPnMmXakx1AY7g1r2RR7dwdqJmQ1C7LYL7ok330= X-Google-Smtp-Source: AGHT+IGp1HEFpKBlPzvGLdHjlSkL9VLALIn2mdOC9GkDps/j6o00dYXrlTi5d5CGoc1xVMCg+wJO1A== X-Received: by 2002:a5d:5889:0:b0:35f:1edb:4695 with SMTP id ffacd0b85a97d-373118b65acmr3696789f8f.6.1724684915215; Mon, 26 Aug 2024 08:08:35 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.82]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42ac5162322sm155040825e9.24.2024.08.26.08.08.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2024 08:08:34 -0700 (PDT) From: Krzysztof Kozlowski To: Linus Walleij , Bartosz Golaszewski , Heiko Stuebner , Jianqun Xu , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH] gpio: rockchip: fix OF node leak in probe() Date: Mon, 26 Aug 2024 17:08:32 +0200 Message-ID: <20240826150832.65657-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_080837_114975_0FFD5FB9 X-CRM114-Status: GOOD ( 11.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Driver code is leaking OF node reference from of_get_parent() in probe(). Fixes: 936ee2675eee ("gpio/rockchip: add driver for rockchip gpio") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Heiko Stuebner --- drivers/gpio/gpio-rockchip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c index 0bd339813110..365ab947983c 100644 --- a/drivers/gpio/gpio-rockchip.c +++ b/drivers/gpio/gpio-rockchip.c @@ -713,6 +713,7 @@ static int rockchip_gpio_probe(struct platform_device *pdev) return -ENODEV; pctldev = of_pinctrl_get(pctlnp); + of_node_put(pctlnp); if (!pctldev) return -EPROBE_DEFER;