[PATCH v2 09/16] sandbox: scmi: Indicate dead code for coverity

Simon Glass sjg at chromium.org
Fri May 14 03:39:25 CEST 2021


This code is not used due to the value of SCMI_TEST_DEVICES_RD_COUNT.
However, it might increase one day. Add a comment.

Signed-off-by: Simon Glass <sjg at chromium.org>
Reported-by: Coverity (CID: 312942)
---

Changes in v2:
- Add a standard comment instead of a Coverity annotation

 drivers/firmware/scmi/sandbox-scmi_devices.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/firmware/scmi/sandbox-scmi_devices.c b/drivers/firmware/scmi/sandbox-scmi_devices.c
index 66a67928817..fc2dad69c97 100644
--- a/drivers/firmware/scmi/sandbox-scmi_devices.c
+++ b/drivers/firmware/scmi/sandbox-scmi_devices.c
@@ -121,6 +121,7 @@ err_regul:
 	n = SCMI_TEST_DEVICES_RD_COUNT;
 err_reset:
 	for (; n > 0; n--)
+		/* dead code, if SCMI_TEST_DEVICES_RD_COUNT < 2 */
 		reset_free(priv->devices.reset + n - 1);
 
 	return ret;
-- 
2.31.1.751.gd2f1c929bd-goog



More information about the U-Boot mailing list