diff options
author | Nikita Shubin <nikita.shubin@maquefel.me> | 2023-08-23 12:47:27 +0300 |
---|---|---|
committer | Damien Le Moal <dlemoal@kernel.org> | 2023-08-25 16:09:08 +0300 |
commit | 41203f93e2be757c0c8a8dd050938261ce49ab7c (patch) | |
tree | 6b0ad6ae6e7d34ff2c61b9f8b839db675e96b78a /drivers/ata | |
parent | 8566572bf3b4d6e416a4bf2110dbb4817d11ba59 (diff) | |
download | linux-41203f93e2be757c0c8a8dd050938261ce49ab7c.tar.xz |
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')
-rw-r--r-- | drivers/ata/pata_ep93xx.c | 4 |
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; } |