Skip to content

Commit 41203f9

Browse files
maquefeldamien-lemoal
authored andcommitted
ata: pata_ep93xx: fix error return code in probe
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>
1 parent 8566572 commit 41203f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/ata/pata_ep93xx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ static int ep93xx_pata_probe(struct platform_device *pdev)
939939

940940
drv_data = devm_kzalloc(&pdev->dev, sizeof(*drv_data), GFP_KERNEL);
941941
if (!drv_data) {
942-
err = -ENXIO;
942+
err = -ENOMEM;
943943
goto err_rel_gpio;
944944
}
945945

@@ -952,7 +952,7 @@ static int ep93xx_pata_probe(struct platform_device *pdev)
952952
/* allocate host */
953953
host = ata_host_alloc(&pdev->dev, 1);
954954
if (!host) {
955-
err = -ENXIO;
955+
err = -ENOMEM;
956956
goto err_rel_dma;
957957
}
958958

0 commit comments

Comments
 (0)