Skip to content

Commit 9a4ba1f

Browse files
ambaruscristibirsan
authored andcommitted
spi: atmel-quadspi: void return type for atmel_qspi_init()
commit 2d30ac5 ("mtd: spi-nor: atmel-quadspi: Use spi-mem interface for atmel-quadspi driver") removed the error path from atmel_qspi_init(), but not changed the function's return type. Set void return type for atmel_qspi_init(). Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> [claudiu.beznea@microchip.com: adapt it to current code base] Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
1 parent 2be6062 commit 9a4ba1f

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

drivers/spi/atmel-quadspi.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -376,15 +376,13 @@ static int atmel_qspi_setup(struct spi_device *spi)
376376
return 0;
377377
}
378378

379-
static int atmel_qspi_init(struct atmel_qspi *aq)
379+
static void atmel_qspi_init(struct atmel_qspi *aq)
380380
{
381381
/* Reset the QSPI controller */
382382
qspi_writel(aq, QSPI_CR, QSPI_CR_SWRST);
383383

384384
/* Enable the QSPI controller */
385385
qspi_writel(aq, QSPI_CR, QSPI_CR_QSPIEN);
386-
387-
return 0;
388386
}
389387

390388
static irqreturn_t atmel_qspi_interrupt(int irq, void *dev_id)
@@ -475,9 +473,7 @@ static int atmel_qspi_probe(struct platform_device *pdev)
475473
if (err)
476474
goto disable_clk;
477475

478-
err = atmel_qspi_init(aq);
479-
if (err)
480-
goto disable_clk;
476+
atmel_qspi_init(aq);
481477

482478
err = spi_register_controller(ctrl);
483479
if (err)
@@ -519,7 +515,8 @@ static int __maybe_unused atmel_qspi_resume(struct device *dev)
519515

520516
clk_prepare_enable(aq->clk);
521517

522-
return atmel_qspi_init(aq);
518+
atmel_qspi_init(aq);
519+
return 0;
523520
}
524521

525522
static SIMPLE_DEV_PM_OPS(atmel_qspi_pm_ops, atmel_qspi_suspend,

0 commit comments

Comments
 (0)