History

spi: axiado: clean up probe return value

Drop the redundant initialisation and return explicit zero on successful probe to make the code more readable.

Johan Hovold committed 6 months ago

Commit 2b20e671 parent 821f0951 file · +2 −2Browse files

Unified · Split

drivers/spi/spi-axiado.c+2−2
@@ -751,9 +751,9 @@ static const struct spi_controller_mem_ops ax_spi_mem_ops = { · 750 unmodified lines
751751 */
752752 static int ax_spi_probe(struct platform_device *pdev)
753753 {
754− int ret = 0, irq;
755754 struct spi_controller *ctlr;
756755 struct ax_spi *xspi;
756+ int ret, irq;
757757 u32 num_cs;
758758
759759 ctlr = devm_spi_alloc_host(&pdev->dev, sizeof(*xspi));
@@ -852,7 +852,7 @@ static int ax_spi_probe(struct platform_device *pdev) · 92 unmodified lines
852852
853853 pm_runtime_put_autosuspend(&pdev->dev);
854854
855− return ret;
855+ return 0;
856856
857857 err_disable_rpm:
858858 pm_runtime_disable(&pdev->dev);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t