[PATCH 26/35] media: venus: Refator return path
From: Ricardo Ribalda
Date: Mon Apr 15 2024 - 15:44:23 EST
This is a nop, but let cocci now that this is not a good candidate for
min()
drivers/media/platform/qcom/venus/vdec.c:672:12-13: WARNING opportunity for min()
drivers/media/platform/qcom/venus/vdec.c:650:12-13: WARNING opportunity for min()
Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
---
drivers/media/platform/qcom/venus/vdec.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index 1dffeb7de76e..2bc7aecb35e5 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -647,7 +647,9 @@ static int vdec_pm_put(struct venus_inst *inst, bool autosuspend)
mutex_unlock(&core->pm_lock);
- return ret < 0 ? ret : 0;
+ if (ret < 0)
+ return ret;
+ return 0;
}
static int vdec_pm_get_put(struct venus_inst *inst)
@@ -669,7 +671,9 @@ static int vdec_pm_get_put(struct venus_inst *inst)
error:
mutex_unlock(&core->pm_lock);
- return ret < 0 ? ret : 0;
+ if (ret < 0)
+ return ret;
+ return 0;
}
static void vdec_pm_touch(struct venus_inst *inst)
--
2.44.0.683.g7961c838ac-goog