summaryrefslogtreecommitdiff
path: root/drivers/power/reset/at91-sama5d2_shdwc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/reset/at91-sama5d2_shdwc.c')
-rw-r--r--drivers/power/reset/at91-sama5d2_shdwc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/power/reset/at91-sama5d2_shdwc.c b/drivers/power/reset/at91-sama5d2_shdwc.c
index 31080c254124..037976a1fe40 100644
--- a/drivers/power/reset/at91-sama5d2_shdwc.c
+++ b/drivers/power/reset/at91-sama5d2_shdwc.c
@@ -246,6 +246,9 @@ static int __init at91_shdwc_probe(struct platform_device *pdev)
if (!pdev->dev.of_node)
return -ENODEV;
+ if (at91_shdwc)
+ return -EBUSY;
+
at91_shdwc = devm_kzalloc(&pdev->dev, sizeof(*at91_shdwc), GFP_KERNEL);
if (!at91_shdwc)
return -ENOMEM;