Drop the redundant initialisation and return explicit zero on successful probe to make the code more readable.
Unified · Split
| @@ -751,9 +751,9 @@ static const struct spi_controller_mem_ops ax_spi_mem_ops = { · 750 unmodified lines | |||
| 751 | */ | 751 | */ |
| 752 | static int ax_spi_probe(struct platform_device *pdev) | 752 | static 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 | ||
| 857 | err_disable_rpm: | 857 | err_disable_rpm: |
| 858 | pm_runtime_disable(&pdev->dev); | 858 | pm_runtime_disable(&pdev->dev); |