Skip to content

Commit 3549fec

Browse files
PeterZhu789miquelraynal
authored andcommitted
mtd: rawnand: vf610_nfc: Do not check 0 for platform_get_irq()
Since platform_get_irq() never returned zero, so it need not to check whether it returned zero, and we use the return error code of platform_get_irq() to replace the current return error code, for that platform_get_irq() may return -EINVAL or -ENXIO. Signed-off-by: Zhu Wang <wangzhu9@huawei.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230803085056.30888-1-wangzhu9@huawei.com
1 parent 31cbe3a commit 3549fec

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/mtd/nand/raw/vf610_nfc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,8 +827,8 @@ static int vf610_nfc_probe(struct platform_device *pdev)
827827
mtd->name = DRV_NAME;
828828

829829
irq = platform_get_irq(pdev, 0);
830-
if (irq <= 0)
831-
return -EINVAL;
830+
if (irq < 0)
831+
return irq;
832832

833833
nfc->regs = devm_platform_ioremap_resource(pdev, 0);
834834
if (IS_ERR(nfc->regs))

0 commit comments

Comments
 (0)