diff mbox series

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

Message ID 20210514014011.2832707-7-sjg@chromium.org
State Deferred
Delegated to: Tom Rini
Headers show
Series [v2,01/16] sandbox: net: Ensure host name is always a valid string | expand

Commit Message

Simon Glass May 14, 2021, 1:39 a.m. UTC
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@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 mbox series

Patch

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;