diff options
author | Robert Richter <robert.richter@linaro.org> | 2013-10-10 18:23:38 +0200 |
---|---|---|
committer | Robert Richter <rric@kernel.org> | 2013-11-04 15:43:18 -0600 |
commit | a72b8859fd3941cc1d2940d5c43026d2c6fb959e (patch) | |
tree | d2ef84f8fc228330808958e001a694810ce579be /drivers/edac/highbank_l2_edac.c | |
parent | 959f58544b7f20c92d5eb43d1232c96c15c01bfb (diff) |
edac, highbank: Fix interrupt setup of mem and l2 controller
Register and enable interrupts after the edac registration. Otherwise
incomming ecc error interrupts lead to crashes during device setup.
Fixing this in drivers for mc and l2.
Signed-off-by: Robert Richter <robert.richter@linaro.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Cc: stable <stable@vger.kernel.org> # 3.6+
Signed-off-by: Robert Richter <rric@kernel.org>
Diffstat (limited to 'drivers/edac/highbank_l2_edac.c')
-rw-r--r-- | drivers/edac/highbank_l2_edac.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/edac/highbank_l2_edac.c b/drivers/edac/highbank_l2_edac.c index c2bd8c6a4349..10d3d298b640 100644 --- a/drivers/edac/highbank_l2_edac.c +++ b/drivers/edac/highbank_l2_edac.c @@ -90,28 +90,30 @@ static int highbank_l2_err_probe(struct platform_device *pdev) goto err; } + dci->mod_name = dev_name(&pdev->dev); + dci->dev_name = dev_name(&pdev->dev); + + if (edac_device_add_device(dci)) + goto err; + drvdata->db_irq = platform_get_irq(pdev, 0); res = devm_request_irq(&pdev->dev, drvdata->db_irq, highbank_l2_err_handler, 0, dev_name(&pdev->dev), dci); if (res < 0) - goto err; + goto err2; drvdata->sb_irq = platform_get_irq(pdev, 1); res = devm_request_irq(&pdev->dev, drvdata->sb_irq, highbank_l2_err_handler, 0, dev_name(&pdev->dev), dci); if (res < 0) - goto err; - - dci->mod_name = dev_name(&pdev->dev); - dci->dev_name = dev_name(&pdev->dev); - - if (edac_device_add_device(dci)) - goto err; + goto err2; devres_close_group(&pdev->dev, NULL); return 0; +err2: + edac_device_del_device(&pdev->dev); err: devres_release_group(&pdev->dev, NULL); edac_device_free_ctl_info(dci); |