mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 21:33:52 +00:00
mtd: rawnand: tegra: add missing check for platform_get_irq()
[ Upstream commit0a1166c27d
] Add the missing check for platform_get_irq() and return error code if it fails. Fixes:d7d9f8ec77
("mtd: rawnand: add NVIDIA Tegra NAND Flash controller driver") Signed-off-by: Yi Yang <yiyang13@huawei.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230821084046.217025-1-yiyang13@huawei.com Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
c19a8794bf
commit
e651a075d8
1 changed files with 4 additions and 0 deletions
|
@ -1197,6 +1197,10 @@ static int tegra_nand_probe(struct platform_device *pdev)
|
|||
init_completion(&ctrl->dma_complete);
|
||||
|
||||
ctrl->irq = platform_get_irq(pdev, 0);
|
||||
if (ctrl->irq < 0) {
|
||||
err = ctrl->irq;
|
||||
goto err_put_pm;
|
||||
}
|
||||
err = devm_request_irq(&pdev->dev, ctrl->irq, tegra_nand_irq, 0,
|
||||
dev_name(&pdev->dev), ctrl);
|
||||
if (err) {
|
||||
|
|
Loading…
Reference in a new issue