mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
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 <andrew.goodbody@linaro.org> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
committed by
Kever Yang
parent
1961bba4bc
commit
97b0f9f8ce
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user