summaryrefslogtreecommitdiffstats
path: root/sound/soc/qcom/qdsp6/q6adm.c
diff options
context:
space:
mode:
authorTang Bin <tangbin@cmss.chinamobile.com>2020-07-14 13:27:44 +0200
committerMark Brown <broonie@kernel.org>2020-07-17 15:47:00 +0200
commit16bf5e82facd703ba8f206f00f064e786ea8318c (patch)
tree5d8278f52e89180cbbe4c85e51bd70fb515177bf /sound/soc/qcom/qdsp6/q6adm.c
parentASoC: rt5682: disable MICBIAS and Vref2 widget in default (diff)
downloadlinux-16bf5e82facd703ba8f206f00f064e786ea8318c.tar.xz
linux-16bf5e82facd703ba8f206f00f064e786ea8318c.zip
ASoC: qcom: qdsp6: Use IS_ERR() instead of IS_ERR_OR_NULL()
In the function q6adm_open(), q6adm_alloc_copp() doesn't return NULL. Thus use IS_ERR() to validate the returned value instead of IS_ERR_OR_NULL(). And delete the extra line. Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20200714112744.20560-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/qcom/qdsp6/q6adm.c')
-rw-r--r--sound/soc/qcom/qdsp6/q6adm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/qcom/qdsp6/q6adm.c b/sound/soc/qcom/qdsp6/q6adm.c
index 2ec868b2dc04..2f3ea6beb066 100644
--- a/sound/soc/qcom/qdsp6/q6adm.c
+++ b/sound/soc/qcom/qdsp6/q6adm.c
@@ -403,7 +403,7 @@ struct q6copp *q6adm_open(struct device *dev, int port_id, int path, int rate,
spin_lock_irqsave(&adm->copps_list_lock, flags);
copp = q6adm_alloc_copp(adm, port_id);
- if (IS_ERR_OR_NULL(copp)) {
+ if (IS_ERR(copp)) {
spin_unlock_irqrestore(&adm->copps_list_lock, flags);
return ERR_CAST(copp);
}
@@ -419,7 +419,6 @@ struct q6copp *q6adm_open(struct device *dev, int port_id, int path, int rate,
copp->bit_width = bit_width;
copp->app_type = app_type;
-
ret = q6adm_device_open(adm, copp, port_id, path, topology,
channel_mode, bit_width, rate);
if (ret < 0) {