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
751 */751 */
752static int ax_spi_probe(struct platform_device *pdev)752static int ax_spi_probe(struct platform_device *pdev)
753{753{
754 int ret = 0, irq;
755 struct spi_controller *ctlr;754 struct spi_controller *ctlr;
756 struct ax_spi *xspi;755 struct ax_spi *xspi;
756 int ret, irq;
757 u32 num_cs;757 u32 num_cs;
758 758
759 ctlr = devm_spi_alloc_host(&pdev->dev, sizeof(*xspi));759 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
852 852
853 pm_runtime_put_autosuspend(&pdev->dev);853 pm_runtime_put_autosuspend(&pdev->dev);
854 854
855 return ret;855 return 0;
856 856
857err_disable_rpm:857err_disable_rpm:
858 pm_runtime_disable(&pdev->dev);858 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