From patchwork Tue Aug 27 14:44:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13779628 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85F3E1C4EE8 for ; Tue, 27 Aug 2024 14:44:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724769870; cv=none; b=QjkP7wKt7ZpLNGRmNxpUddisM+V+JTu3r3bBt1Dd87R41t08eGn9yzrz7DHIeOlckScHzHB0ITaFTYspaU71tMzfKnXo/mVQMpZzHGpTDiALmIVN+Y1XGOiVTJS1fpMvtPmNW+sF+Aa8+N3kJPD7785JDRLRS5r06GjpfZWW1Zc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724769870; c=relaxed/simple; bh=9vexD2mmzgeQENC9LitcJeueSXuVsjquGp1/eS5zaO4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JEDhhbf+5pAUn3TGxsAxwdeyN00LeYryWVDQoImr0i7GHZ8dhyb958pd47R6jrFoXwE5Glt6W9HLGVZxVhDD527JDHJeDZ/9jzA94nS9dBaoqowqbZ3AIiFpVe9u43yF9yB9/c/D9oZW2sZdUMlO8DQCaAijiVbNu8zG7cpaKV0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=sETS3Xrn; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sETS3Xrn" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-3718cea0693so206575f8f.2 for ; Tue, 27 Aug 2024 07:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724769867; x=1725374667; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YPdvIKW8FgFCV9KPcyxeAD/wE24NwXWq7P7bt6Yx4PY=; b=sETS3Xrnqt8icel8VeHtXkw6LRpLmBxlzHyHhi635LB8ozM+v3+bK/rejagxrvGKuC OHpam32wVCwg4rnh/Eu1q7xi3lgPZCXwzVDcBP81Xs9uLcVpUlbGl61J5vbHw375mTZH YJeUqrlaALGJR1BOoxYg5ohhNd/0LRtcDk0NDHn4g80kZjNKNbdDxRKTmmWtp9i4qfKi x/MB3JGNoPmj13nyhsz2mh6vZjiv3LlwjnnT0QY7Zn3/VDFRHKDw+p8n40784WoWyc9S jxE+1kYLTfCJIcwMr/tWtcshgKWUfcgvkFAssrq5ZzT7+SxkvAI/vfvc7ukZlKO+/sXo h1qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724769867; x=1725374667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YPdvIKW8FgFCV9KPcyxeAD/wE24NwXWq7P7bt6Yx4PY=; b=v5ohZPuuneV06e8Z8GgeW6yUY6wx/ixe2Y3C/mL/Y6JkviJW6TszZlam6aQ02mRLE1 IH6YxAU/6cVRfvLlZYDzly9bkzNN4Xp6vsjflo9+Ex42f9jg90Oa6vhJIr/2fjG2yzls WQr+91nGmGqwcHHR5M0cRgUj4kNQiCC4Y/rn790PDJHHrxSs9v5fg/Jxhk0jRTwaDOFX xlwlpwhbO1xtQKcMQSa7Sz2q0TAf/feTgQnSIzhvTWit9ejgcz2cYm9304anhrD90Xqd rLQS41wPFbVeler3rHzSU7iOS6oe5cj7j/eHN08M8AXyUokkqY3ijCS2g54EXwGXoDSb Y+aw== X-Forwarded-Encrypted: i=1; AJvYcCUAr9NeGKT9SP03HOJWCk2O3OifdQ4JGsz/sHWS+vUe895+peSc63nYVVax8HO0nxLFLgzVdJY=@vger.kernel.org X-Gm-Message-State: AOJu0YyNpU1MJlbaoUdyvP3x3u2JAGFUovEQYflF+n/N6bCjxNaTNPKi G/XVLWzzB8q4mvLVfcq1A7E6D5Il9FSNJHWYY1JQErF/xILJUt9c7jaD26pKocs= X-Google-Smtp-Source: AGHT+IEJsWgD4WKt2n6pCZX8Vmj/AnxM/MX4C4ng7kiuGPcfY33T6OA79b7gqBNqaj6PS2psGzM3CA== X-Received: by 2002:a5d:6d05:0:b0:367:9495:9016 with SMTP id ffacd0b85a97d-373118e9996mr5514954f8f.6.1724769866777; Tue, 27 Aug 2024 07:44:26 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.82]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ff654sm13270457f8f.75.2024.08.27.07.44.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 07:44:26 -0700 (PDT) From: Krzysztof Kozlowski To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Simon Horman , Krzysztof Kozlowski Subject: [PATCH net-next RESEND 1/3] net: hisilicon: hip04: fix OF node leak in probe() Date: Tue, 27 Aug 2024 16:44:19 +0200 Message-ID: <20240827144421.52852-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240827144421.52852-1-krzysztof.kozlowski@linaro.org> References: <20240827144421.52852-1-krzysztof.kozlowski@linaro.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Driver is leaking OF node reference from of_parse_phandle_with_fixed_args() in probe(). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Simon Horman --- drivers/net/ethernet/hisilicon/hip04_eth.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c index b91e7a06b97f..beb815e5289b 100644 --- a/drivers/net/ethernet/hisilicon/hip04_eth.c +++ b/drivers/net/ethernet/hisilicon/hip04_eth.c @@ -947,6 +947,7 @@ static int hip04_mac_probe(struct platform_device *pdev) priv->tx_coalesce_timer.function = tx_done; priv->map = syscon_node_to_regmap(arg.np); + of_node_put(arg.np); if (IS_ERR(priv->map)) { dev_warn(d, "no syscon hisilicon,hip04-ppe\n"); ret = PTR_ERR(priv->map); From patchwork Tue Aug 27 14:44:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13779629 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E615C1C5792 for ; Tue, 27 Aug 2024 14:44:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724769871; cv=none; b=t5b1FXk56jYALBc4u0mZcjn7pCrCCEYEPUkrUGyT2rkLCXfHOI7JRF7gKzAwEszdxq39M3uOt3nlwBC5mYw+nfWNvwtot7gaOOPYn9K6nqmzC5e37Q3A2/h0NlwLMKHxgWjjdb3Hf6H5JFSHUMmNAY8P1/KzUgqdgMx+Siljj5o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724769871; c=relaxed/simple; bh=ue6WPVo2ptKZgCeNkE1VgO0ePkeq3s2Ko4LKgOeSSVQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WSK2HTPSrZpKq9B9QbxnbAnnKsMfpzKrxqso0wAe7MBO0Npp+vurPx71nw7AcE81vXPc7p+t2vEHrLQrOO1mGlQyrnXCs83xX13EnVQ/fxXeXWTHXW971SWAudSf+pHF0Jfxc5DxYemPSPTrm8m6xNLtqxmcZ09qMU4o2ShtArU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=G/Zl13l3; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="G/Zl13l3" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-3719f3f87ffso145732f8f.2 for ; Tue, 27 Aug 2024 07:44:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724769868; x=1725374668; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KMtvRXV/U3e/l+PzLA8fY7oKc3KTxA0nshrMdnXdyGM=; b=G/Zl13l3ErRnoprxZG84X8WzLEws3gCdOnf+BVBRU474/1OaMs8vz97Zr/jxMlcDfG lgo3vC6SQCThpTmRUPB4IeF+TqUh8aG5fcNrItCOk7WRka1bOPolvwClh2UX1v4TOT7+ boLw4V9AHxe1Xqei7Cm2FtC+ij6Ow1fxfMaGB9kBbLeyXMPc1u0Cb+GsEc3ENfC5zA/6 RmYwIahRHCsS2ZuGcBHelYFnwrNNdOLfW78T9g2r/RXLKiGmry2/d94wp6nttkmePjfi z4VghtfcGy68gQN81JL6I7KZoh5rGYQ1Vl0hC2mkUtLUwaqDZ9TxxHKh1638siHrle+u DY8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724769868; x=1725374668; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KMtvRXV/U3e/l+PzLA8fY7oKc3KTxA0nshrMdnXdyGM=; b=LZ2VO1HO3REKX3o0OG9aCjJXZXntU1Rbyvijm47+vBgNvrms9erhnOlr07L0sRwi9W vKZKk7kSstAhbPtsucmo9ztB0HxaIsd6Cx2l+y3cSO0x1OP3i2nm9FOEkeSvNmz1T5u8 BGQeWBXF+M7WwQ61H7AyOBkKd7ARn06QwEejArtYHeFbTl3VklRxbp3uO4E1gQWjuqBr GMt/uCBbADwLh5pAXW5BRQvkY2H50ESHXlURja+UMgvyStzKCBfmVgxHxxQkU/Sll2vA WBVnusJrA6YaJcXI4qFlB0L6ySQLVOLuxYfACL11dMXmUNUGaMDanLegSPXMGMAe1OjM mWJA== X-Forwarded-Encrypted: i=1; AJvYcCUpgtp8S9WGMjxw0ceTzAA0sRm8rG3H9mMnuaBObEOVdH7WRD3oN1qc8F/p6bhXDU+GwRVMzHk=@vger.kernel.org X-Gm-Message-State: AOJu0Yz6D2KIW2e8I9/DfdG0L1fad0u1yvgJCeN3tsRQ3nE63sh+P0L9 ORiuqGErLtUnZmqiESC/jnqT+uw3UWSqiBaps2omOR8yE1Cx/lVBfBOg6Fhvc8Q= X-Google-Smtp-Source: AGHT+IHDXLfSvZsnyIQUPh/YuEtya/oGVL1iC+4RsBP4IZ1dC1c92Nqcl6zanmBibwQIO5ohbR+o6w== X-Received: by 2002:a5d:6d8d:0:b0:368:4c5:af5 with SMTP id ffacd0b85a97d-373118fdc9bmr4803105f8f.10.1724769868278; Tue, 27 Aug 2024 07:44:28 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.82]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ff654sm13270457f8f.75.2024.08.27.07.44.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 07:44:27 -0700 (PDT) From: Krzysztof Kozlowski To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Simon Horman , Krzysztof Kozlowski Subject: [PATCH net-next RESEND 2/3] net: hisilicon: hns_dsaf_mac: fix OF node leak in hns_mac_get_info() Date: Tue, 27 Aug 2024 16:44:20 +0200 Message-ID: <20240827144421.52852-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240827144421.52852-1-krzysztof.kozlowski@linaro.org> References: <20240827144421.52852-1-krzysztof.kozlowski@linaro.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org 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 --- 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 f75668c47935..616a2768e504 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; From patchwork Tue Aug 27 14:44:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13779630 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3124D1C57A3 for ; Tue, 27 Aug 2024 14:44:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724769872; cv=none; b=X9FGB5fxtL+bqgJcYhNLcwuTlvVKZ3d/U2kSt351JUX06ScRnQFJG2g2zc+oHtVG5xUvAHzeRjWOzrejqr6eOiZp/B62CbQcevugoN2Q5+KI3REn3CJE65cvgHIcY+GV5wiSjF9Vvio+YO6YcExez7Y6F8Q0rqY6Ae4JuSh32Ao= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724769872; c=relaxed/simple; bh=9cJgFjD/R7mUY/jBwLx1PxnCORxDvEzzYDQVq9k+sW0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UaFpvhzYjZU26QeSqVDt7ExrlCxglNvaCz8/t/S6Z9/MyaQqT0GukAip+v8KVOaeRJa9N8WDaUH47xRUuHQATTGib+EuiYsMk6cZvvFIPr/Om8uW838fYt358otCQZ8UcN56wP9zOsxT8b5L9l2aid0ypwyLrw5AfhlehRVlWwg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=jEtLB0EG; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="jEtLB0EG" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-3719f3f87ffso145736f8f.2 for ; Tue, 27 Aug 2024 07:44:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724769869; x=1725374669; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LEXiFF9+y1AtJUUe0lBIVMSQ2gFJFplRHBS/b2AQ058=; b=jEtLB0EGfh7uOtCd+PsNwvjljxe7mw5mvh5geXteqcxqEpZmdW28Yw6v0xKdQm1260 VUc48XjuRj0QfuZrqL5tbXXSQTxGwoF62TVJX5E9T17EhD/9nfdQCuCc/enF6DKjXjga VGE8fng8kgN+V8bnpPBHB23JV2t/Xlh3rI1qlVA5wPK4RiQxnxZS2gH2GST9KfhpKQ49 Nxmhwpbd7i7PSkHTmlu4yzlr0m3qJnW39D1LSBDxcnkZJ0JyGITJWx6HcINiVpCjFW6x c+lUMvkXR7vvGrwWaslsiU24unxtz6IlgcPuIERtCb5zMQLdYK33KPtOZeTt/PwI7GHR gjdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724769869; x=1725374669; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LEXiFF9+y1AtJUUe0lBIVMSQ2gFJFplRHBS/b2AQ058=; b=Ca+EsRhB9qEfCHH0u38jHNEIN8JisuKKFqAbL1BjbY3DsQ48lPXeizGxehmXDPMMxt IwbNHZ9+9QNSrwSW9LdCZ8T+z4o4DSIkcbJMduW6DJAFfUiU/R/zB7bNBPztOtbNnW7e k6yTutuAi2hS1F+0qJqexaDICzYKLcz6ClZbjiWaEma+lY+3NgGF8ZreisMZsC0QPmZC LSBVRA8gUfQXo8MeLxxTttDoH2XruCHu0DbwOHxtoejMzAsvwG64eBYRctbSTE5yAB5r ZzvsOxqvPuktzrrJ13xWv8Rflc+BngMP0tsJqB9oe1H+nVFGX58Fv+cHmqIA0XJFck+D Bx3Q== X-Forwarded-Encrypted: i=1; AJvYcCWtd2fHpG4FFfjAd0un7+LyzS94pc0ILMmm7VummslTqgXi59EDxwgcc/fdfYZhrPqJxteG1uo=@vger.kernel.org X-Gm-Message-State: AOJu0YzlILnTbXee/z2DjcwTGvG7sMBkm9k03Z2UsJRmhE5YOJkc2JFQ +QdRZjh2jaW3DeXN/cLT0XaNrSvdvvgV8Xg78FJVFaPNpV4xZVwPo9HV75s+tcU= X-Google-Smtp-Source: AGHT+IGffSjXGCUmbOSah5oQPlaHyK36FMHgV70SJ2QT+CDm/NnObADKG1Btd3N3UFma8fanv9/p7w== X-Received: by 2002:a5d:648e:0:b0:373:6bf:9608 with SMTP id ffacd0b85a97d-37311843370mr5580812f8f.2.1724769869564; Tue, 27 Aug 2024 07:44:29 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.82]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ff654sm13270457f8f.75.2024.08.27.07.44.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2024 07:44:29 -0700 (PDT) From: Krzysztof Kozlowski To: Yisen Zhuang , Salil Mehta , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Simon Horman , Krzysztof Kozlowski Subject: [PATCH net-next RESEND 3/3] net: hisilicon: hns_mdio: fix OF node leak in probe() Date: Tue, 27 Aug 2024 16:44:21 +0200 Message-ID: <20240827144421.52852-4-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240827144421.52852-1-krzysztof.kozlowski@linaro.org> References: <20240827144421.52852-1-krzysztof.kozlowski@linaro.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Driver is leaking OF node reference from of_parse_phandle_with_fixed_args() in probe(). Signed-off-by: Krzysztof Kozlowski Reviewed-by: Simon Horman --- drivers/net/ethernet/hisilicon/hns_mdio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/hisilicon/hns_mdio.c b/drivers/net/ethernet/hisilicon/hns_mdio.c index ed73707176c1..8a047145f0c5 100644 --- a/drivers/net/ethernet/hisilicon/hns_mdio.c +++ b/drivers/net/ethernet/hisilicon/hns_mdio.c @@ -575,6 +575,7 @@ static int hns_mdio_probe(struct platform_device *pdev) MDIO_SC_RESET_ST; } } + of_node_put(reg_args.np); } else { dev_warn(&pdev->dev, "find syscon ret = %#x\n", ret); mdio_dev->subctrl_vbase = NULL;