[PATCH 10/17] sandbox: scmi: Indicate dead code for coverity

Simon Glass sjg at chromium.org
Sun May 9 00:00:14 CEST 2021


This code is not used due to the value of SCMI_TEST_DEVICES_RD_COUNT.
However, it might increase one day, so add an annotation for coverity to
quieten the warning.

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

 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..de7941aed29 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--)
+		/* coverity[DEADCODE] */
 		reset_free(priv->devices.reset + n - 1);
 
 	return ret;
-- 
2.31.1.607.g51e8a6a459-goog



More information about the U-Boot mailing list