mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
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>
This commit is contained in:
parent
8566572bf3
commit
41203f93e2
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue