Commit 75560718 authored by Hongbo Li's avatar Hongbo Li Committed by Mark Brown

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: default avatarHongbo Li <lihongbo22@huawei.com>
Link: https://patch.msgid.link/20240828122829.3697502-1-lihongbo22@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 69a8d0ed
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment