Skip to content

Commit

Permalink
ASoC: dapm: Use IS_ERR_OR_NULL() helper function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hongbo Li authored and Mark Brown committed Aug 28, 2024
1 parent 69a8d0e commit 7556071
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7556071

Please sign in to comment.