[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1645776031-13516-1-git-send-email-baihaowen@meizu.com>
Date: Fri, 25 Feb 2022 16:00:31 +0800
From: Haowen Bai <baihaowen@...zu.com>
To: <agross@...nel.org>, <bjorn.andersson@...aro.org>
CC: <linux-arm-msm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
"Haowen Bai" <baihaowen@...zu.com>
Subject: [PATCH] soc: qcom: qmi: Use min() instead of doing it manually
Fix following coccicheck warning:
drivers/soc/qcom/qmi_interface.c:773:12-13: WARNING opportunity for min()
Signed-off-by: Haowen Bai <baihaowen@...zu.com>
---
drivers/soc/qcom/qmi_interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/qcom/qmi_interface.c b/drivers/soc/qcom/qmi_interface.c
index c8c4c73..3337a70 100644
--- a/drivers/soc/qcom/qmi_interface.c
+++ b/drivers/soc/qcom/qmi_interface.c
@@ -770,7 +770,7 @@ static ssize_t qmi_send_message(struct qmi_handle *qmi,
kfree(msg);
- return ret < 0 ? ret : 0;
+ return min(ret, 0);
}
/**
--
2.7.4
Powered by blists - more mailing lists