summaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_ep93xx.c
diff options
context:
space:
mode:
authorNikita Shubin <nikita.shubin@maquefel.me>2023-08-23 11:47:27 +0200
committerDamien Le Moal <dlemoal@kernel.org>2023-08-25 15:09:08 +0200
commit41203f93e2be757c0c8a8dd050938261ce49ab7c (patch)
tree6b0ad6ae6e7d34ff2c61b9f8b839db675e96b78a /drivers/ata/pata_ep93xx.c
parentata: sata_gemini: Add missing MODULE_DESCRIPTION (diff)
downloadlinux-41203f93e2be757c0c8a8dd050938261ce49ab7c.tar.xz
linux-41203f93e2be757c0c8a8dd050938261ce49ab7c.zip
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>
Diffstat (limited to 'drivers/ata/pata_ep93xx.c')
-rw-r--r--drivers/ata/pata_ep93xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
index 744ad5e8cfbf..47bff06202f4 100644
--- a/drivers/ata/pata_ep93xx.c
+++ b/drivers/ata/pata_ep93xx.c
@@ -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;
}
@@ -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;
}