diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2021-09-16 11:36:27 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-10-05 13:51:11 +0200 |
commit | 230f7d9321b82d721ab4665a52a0c37d37ab45d9 (patch) | |
tree | 4b8da301d8e3c4bc80e620ef3bc9653f34cbaf2e /drivers | |
parent | d64e4d691f19180825035e480218596427e3f9d1 (diff) | |
download | barebox-230f7d9321b82d721ab4665a52a0c37d37ab45d9.tar.gz barebox-230f7d9321b82d721ab4665a52a0c37d37ab45d9.tar.xz |
mci-bcm2835: Fix return type handling of bcm2835_mci_wait_command_done()
The function returns a negative value in a code path and the return value
is used as a return value for another functions returning int, too. So
change the value to int (and the variable holding the return value, too).
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.barebox.org/20210916093627.173566-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mci/mci-bcm2835.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mci/mci-bcm2835.c b/drivers/mci/mci-bcm2835.c index 12f7cb6ea3..f2cb65231e 100644 --- a/drivers/mci/mci-bcm2835.c +++ b/drivers/mci/mci-bcm2835.c @@ -84,7 +84,7 @@ static u32 bcm2835_sdhci_read32(struct sdhci *sdhci, int reg) return readl(host->regs + reg); } -static u32 bcm2835_mci_wait_command_done(struct bcm2835_mci_host *host) +static int bcm2835_mci_wait_command_done(struct bcm2835_mci_host *host) { u32 interrupt = 0; uint64_t start; @@ -131,7 +131,8 @@ static void bcm2835_mci_reset_emmc(struct bcm2835_mci_host *host, u32 reset, */ static int bcm2835_mci_request(struct mci_host *mci, struct mci_cmd *cmd, struct mci_data *data) { - u32 command, block_data = 0, ret = 0, transfer_mode = 0; + u32 command, block_data = 0, transfer_mode = 0; + int ret; u32 wait_inhibit_mask = SDHCI_CMD_INHIBIT_CMD | SDHCI_CMD_INHIBIT_DATA; struct bcm2835_mci_host *host = to_bcm2835_host(mci); |