All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: atmel-mci: simplify if-if to if-else
@ 2022-04-24  9:04 ` Wan Jiabing
  0 siblings, 0 replies; 8+ messages in thread
From: Wan Jiabing @ 2022-04-24  9:04 UTC (permalink / raw)
  To: Ludovic Desroches, Ulf Hansson, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea, linux-mmc, linux-arm-kernel, linux-kernel
  Cc: kael_w, Wan Jiabing

Use if and else instead of if(A) and if (!A).

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
 drivers/mmc/host/atmel-mci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 807177c953f3..98893ccad4bd 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -1125,8 +1125,7 @@ atmci_prepare_data_dma(struct atmel_mci *host, struct mmc_data *data)
 	chan = host->dma.chan;
 	if (chan)
 		host->data_chan = chan;
-
-	if (!chan)
+	else
 		return -ENODEV;
 
 	if (data->flags & MMC_DATA_READ) {
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-04-26 22:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-24  9:04 [PATCH] mmc: atmel-mci: simplify if-if to if-else Wan Jiabing
2022-04-24  9:04 ` Wan Jiabing
2022-04-26 13:53 ` Ulf Hansson
2022-04-26 13:53   ` Ulf Hansson
2022-04-26 15:06   ` Wan Jiabing
2022-04-26 15:06     ` Wan Jiabing
2022-04-26 22:43     ` Ulf Hansson
2022-04-26 22:43       ` Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.