From: Hongbo Li Date: Wed, 28 Aug 2024 12:28:29 +0000 (+0800) Subject: ASoC: dapm: Use IS_ERR_OR_NULL() helper function X-Git-Tag: v6.12-rc1~169^2~1^2~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=75560718e83bede12d70b2a6b6940089477f58e4;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://patch.msgid.link/20240828122829.3697502-1-lihongbo22@huawei.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index d7d6dbb9d9eae..ad289f91b13a8 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -2254,7 +2254,7 @@ static const struct file_operations dapm_bias_fops = { void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, struct dentry *parent) { - if (!parent || IS_ERR(parent)) + if (IS_ERR_OR_NULL(parent)) return; dapm->debugfs_dapm = debugfs_create_dir("dapm", parent);