lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240709085131.1436128-1-nichen@iscas.ac.cn>
Date: Tue,  9 Jul 2024 16:51:31 +0800
From: Chen Ni <nichen@...as.ac.cn>
To: lgirdwood@...il.com,
	broonie@...nel.org,
	perex@...ex.cz,
	tiwai@...e.com,
	matthias.bgg@...il.com,
	angelogioacchino.delregno@...labora.com,
	amergnat@...libre.com,
	kuninori.morimoto.gx@...esas.com,
	jernej.skrabec@...il.com,
	nfraprado@...labora.com,
	robh@...nel.org
Cc: linux-sound@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org,
	Chen Ni <nichen@...as.ac.cn>
Subject: [PATCH] ASoC: mediatek: mt8192: remove redundant null pointer check before of_node_put

of_node_put() has taken the null pointer check into account. So it is safe
to remove the duplicated check before of_node_put().

Signed-off-by: Chen Ni <nichen@...as.ac.cn>
---
 sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
index 8b323fb19925..db00704e206d 100644
--- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
+++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
@@ -1108,9 +1108,7 @@ static int mt8192_mt6359_legacy_probe(struct mtk_soc_card_data *soc_card_data)
 err_headset_codec:
 	of_node_put(speaker_codec);
 err_speaker_codec:
-	if (hdmi_codec)
-		of_node_put(hdmi_codec);
-
+	of_node_put(hdmi_codec);
 	return ret;
 }
 
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ