Skip to content

Commit 0a1166c

Browse files
Yi Yangmiquelraynal
authored andcommitted
mtd: rawnand: tegra: add missing check for platform_get_irq()
Add the missing check for platform_get_irq() and return error code if it fails. Fixes: d7d9f8e ("mtd: rawnand: add NVIDIA Tegra NAND Flash controller driver") Signed-off-by: Yi Yang <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent 0bb80ec commit 0a1166c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/mtd/nand/raw/tegra_nand.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,6 +1197,10 @@ static int tegra_nand_probe(struct platform_device *pdev)
11971197
init_completion(&ctrl->dma_complete);
11981198

11991199
ctrl->irq = platform_get_irq(pdev, 0);
1200+
if (ctrl->irq < 0) {
1201+
err = ctrl->irq;
1202+
goto err_put_pm;
1203+
}
12001204
err = devm_request_irq(&pdev->dev, ctrl->irq, tegra_nand_irq, 0,
12011205
dev_name(&pdev->dev), ctrl);
12021206
if (err) {

0 commit comments

Comments
 (0)