spi: spi-zynq: Do not check for 0 return after calling platform_get_irq()
It is not possible for platform_get_irq() to return 0. Use the return value from platform_get_irq(). Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Link: https://lore.kernel.org/r/20230802094357.981100-1-ruanjinjie@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Родитель
33f1ef6d4e
Коммит
3182d49aad
|
@ -679,8 +679,8 @@ static int zynq_qspi_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
xqspi->irq = platform_get_irq(pdev, 0);
|
||||
if (xqspi->irq <= 0) {
|
||||
ret = -ENXIO;
|
||||
if (xqspi->irq < 0) {
|
||||
ret = xqspi->irq;
|
||||
goto clk_dis_all;
|
||||
}
|
||||
ret = devm_request_irq(&pdev->dev, xqspi->irq, zynq_qspi_irq,
|
||||
|
|
|
@ -1293,8 +1293,8 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
|
|||
zynqmp_qspi_init_hw(xqspi);
|
||||
|
||||
xqspi->irq = platform_get_irq(pdev, 0);
|
||||
if (xqspi->irq <= 0) {
|
||||
ret = -ENXIO;
|
||||
if (xqspi->irq < 0) {
|
||||
ret = xqspi->irq;
|
||||
goto clk_dis_all;
|
||||
}
|
||||
ret = devm_request_irq(&pdev->dev, xqspi->irq, zynqmp_qspi_irq,
|
||||
|
|
Загрузка…
Ссылка в новой задаче