mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
EDAC, altera: Fix error handling path in altr_edac_device_probe()
Return the proper error value if devm_ioremap() fails (and not 0). Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Thor Thayer <thor.thayer@linux.intel.com> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/20170816050506.14541-1-christophe.jaillet@wanadoo.fr [ Massage commit message. ] Signed-off-by: Borislav Petkov <bp@suse.de>
This commit is contained in:
parent
3e5d2bd191
commit
8b073d945c
@ -747,8 +747,10 @@ static int altr_edac_device_probe(struct platform_device *pdev)
|
||||
drvdata->edac_dev_name = ecc_name;
|
||||
|
||||
drvdata->base = devm_ioremap(&pdev->dev, r->start, resource_size(r));
|
||||
if (!drvdata->base)
|
||||
if (!drvdata->base) {
|
||||
res = -ENOMEM;
|
||||
goto fail1;
|
||||
}
|
||||
|
||||
/* Get driver specific data for this EDAC device */
|
||||
drvdata->data = of_match_node(altr_edac_device_of_match, np)->data;
|
||||
|
Loading…
Reference in New Issue
Block a user