diff options
-rw-r--r-- | sound/soc/codecs/lpass-macro-common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/lpass-macro-common.c b/sound/soc/codecs/lpass-macro-common.c index 3c661fd61173..1b9082d237c1 100644 --- a/sound/soc/codecs/lpass-macro-common.c +++ b/sound/soc/codecs/lpass-macro-common.c @@ -25,7 +25,7 @@ struct lpass_macro *lpass_macro_pds_init(struct device *dev) l_pds->macro_pd = dev_pm_domain_attach_by_name(dev, "macro"); if (IS_ERR_OR_NULL(l_pds->macro_pd)) { - ret = PTR_ERR(l_pds->macro_pd); + ret = l_pds->macro_pd ? PTR_ERR(l_pds->macro_pd) : -ENODATA; goto macro_err; } @@ -35,7 +35,7 @@ struct lpass_macro *lpass_macro_pds_init(struct device *dev) l_pds->dcodec_pd = dev_pm_domain_attach_by_name(dev, "dcodec"); if (IS_ERR_OR_NULL(l_pds->dcodec_pd)) { - ret = PTR_ERR(l_pds->dcodec_pd); + ret = l_pds->dcodec_pd ? PTR_ERR(l_pds->dcodec_pd) : -ENODATA; goto dcodec_err; } |