From: Chen Ni Date: Tue, 9 Jul 2024 08:51:31 +0000 (+0800) Subject: ASoC: mediatek: mt8192: remove redundant null pointer check before of_node_put X-Git-Tag: v6.12-rc1~169^2~1^2~120 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42eb47310f89eca3226e8e427bc9d571149dc866;p=thirdparty%2Flinux.git 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 Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20240709085131.1436128-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown --- diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c index 8b323fb199251..db00704e206d6 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; }