diff options
| author | Andrew Goodbody <[email protected]> | 2025-07-31 12:46:10 +0100 |
|---|---|---|
| committer | Kever Yang <[email protected]> | 2025-08-30 23:33:32 +0800 |
| commit | 97b0f9f8ce4fc8d994fad60660e1daba2da190e9 (patch) | |
| tree | 0336a082aa38fc14e8bf06acd89c74836f05453c /drivers | |
| parent | 1961bba4bc341573db98a6fd34eac771e914681f (diff) | |
mmc: rockchip_sdhci: Do not test unsigned for being less than 0
In rockchip_sdhci_execute_tuning the variable tuning_loop_counter is
tested for being less than 0. Ensure that it is a signed type by
declaring it as s8 instead of char.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <[email protected]>
Reviewed-by: Peng Fan <[email protected]>
Reviewed-by: Kever Yang <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/mmc/rockchip_sdhci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c index 761e3619329..5e025d76a82 100644 --- a/drivers/mmc/rockchip_sdhci.c +++ b/drivers/mmc/rockchip_sdhci.c @@ -500,7 +500,7 @@ static int rockchip_sdhci_execute_tuning(struct mmc *mmc, u8 opcode) { struct rockchip_sdhc *priv = dev_get_priv(mmc->dev); struct sdhci_host *host = &priv->host; - char tuning_loop_counter = SDHCI_TUNING_LOOP_COUNT; + s8 tuning_loop_counter = SDHCI_TUNING_LOOP_COUNT; struct mmc_cmd cmd; u32 ctrl, blk_size; int ret; |
