Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@iscas.ac.cn>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20240709085131.1436128-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Chen Ni and committed by
Mark Brown
42eb4731 4f8cd05a

+1 -3
+1 -3
sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
··· 1108 1108 err_headset_codec: 1109 1109 of_node_put(speaker_codec); 1110 1110 err_speaker_codec: 1111 - if (hdmi_codec) 1112 - of_node_put(hdmi_codec); 1113 - 1111 + of_node_put(hdmi_codec); 1114 1112 return ret; 1115 1113 } 1116 1114