From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D68E1DED4E; Tue, 8 Oct 2024 13:12:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728393150; cv=none; b=WvSjuo0l1iWNNiZgWYQDddFpa1J77/UKKGyykBduz2HeAKRphiqCRzdyS9OWKOKG4K8lTNgmZvd9PANOktPJeUQE/yUjfvMWw6m4hZhGKxOflktO1rMiCz3MabILw/wnEsZEqOxVPMAV09MIYIRUhbR9ys2ml9cnQQE3oquVDgg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728393150; c=relaxed/simple; bh=4ZhM/JRUdnyxkEic7EoSPw2wC6aq2NtccoaoOkfANDc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TVkP/nHfLUaVCg/dq7rXBizlOdrGGLPxmocg/VnKDO2280D7YZXer49K2TzQFRDPLbZV+rlHANavyOmk6gK1rdg8e3/HibLcAj30n9372rUiyJCbOKsLsHPGJJqOaM1GrtleuMuGfS+CYJhUBcv/kzkSfEyYDGG0NkqBRGZ5Tyk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EYLRqfpD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="EYLRqfpD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 137CBC4CECD; Tue, 8 Oct 2024 13:12:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728393149; bh=4ZhM/JRUdnyxkEic7EoSPw2wC6aq2NtccoaoOkfANDc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EYLRqfpDgEcW+JCdrHB/bV4QP5YWkhZhFLYNpNGg5dVLl22vdnHiBznOI7fMDKHkH 00zJioGtsXIhqCNlzWkz0VZdfeTxBZL+eoUMP0Qc7EjfYHA51A+I/SVvNtwfe5Owum bKD5cn/erQndSqzH6LppncV+xnTKzDnNn2ZjCrEk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Krzysztof Kozlowski , Simon Horman , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.6 068/386] net: hisilicon: hns_dsaf_mac: fix OF node leak in hns_mac_get_info() Date: Tue, 8 Oct 2024 14:05:13 +0200 Message-ID: <20241008115632.140568529@linuxfoundation.org> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241008115629.309157387@linuxfoundation.org> References: <20241008115629.309157387@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Krzysztof Kozlowski [ Upstream commit 5680cf8d34e1552df987e2f4bb1bff0b2a8c8b11 ] Driver is leaking OF node reference from of_parse_phandle_with_fixed_args() in hns_mac_get_info(). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Simon Horman Link: https://patch.msgid.link/20240827144421.52852-3-krzysztof.kozlowski@linaro.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c index f75668c479351..616a2768e5048 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c @@ -933,6 +933,7 @@ static int hns_mac_get_info(struct hns_mac_cb *mac_cb) mac_cb->cpld_ctrl = NULL; } else { syscon = syscon_node_to_regmap(cpld_args.np); + of_node_put(cpld_args.np); if (IS_ERR_OR_NULL(syscon)) { dev_dbg(mac_cb->dev, "no cpld-syscon found!\n"); mac_cb->cpld_ctrl = NULL; -- 2.43.0