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

ASoC: dapm: Use IS_ERR_OR_NULL() helper function

Use the IS_ERR_OR_NULL() helper instead of open-coding a
NULL and an error pointer checks to simplify the code and
improve readability.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Link: https://patch.msgid.link/20240828122829.3697502-1-lihongbo22@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Hongbo Li and committed by
Mark Brown
75560718 69a8d0ed

+1 -1
+1 -1
sound/soc/soc-dapm.c
··· 2254 2254 void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, 2255 2255 struct dentry *parent) 2256 2256 { 2257 - if (!parent || IS_ERR(parent)) 2257 + if (IS_ERR_OR_NULL(parent)) 2258 2258 return; 2259 2259 2260 2260 dapm->debugfs_dapm = debugfs_create_dir("dapm", parent);