Skip to content

Commit

Permalink
ata: pata_ep93xx: fix error return code in probe
Browse files Browse the repository at this point in the history
Return -ENOMEM from ep93xx_pata_probe() if devm_kzalloc() or
ata_host_alloc() fails.

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
  • Loading branch information
Nikita Shubin authored and Damien Le Moal committed Aug 25, 2023
1 parent 8566572 commit 41203f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ata/pata_ep93xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ static int ep93xx_pata_probe(struct platform_device *pdev)

drv_data = devm_kzalloc(&pdev->dev, sizeof(*drv_data), GFP_KERNEL);
if (!drv_data) {
err = -ENXIO;
err = -ENOMEM;
goto err_rel_gpio;
}

Expand All @@ -952,7 +952,7 @@ static int ep93xx_pata_probe(struct platform_device *pdev)
/* allocate host */
host = ata_host_alloc(&pdev->dev, 1);
if (!host) {
err = -ENXIO;
err = -ENOMEM;
goto err_rel_dma;
}

Expand Down

0 comments on commit 41203f9

Please sign in to comment.