power: reset: at91-poweroff: do not procede if at91_shdwc is allocated
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Thu, 30 Aug 2018 11:50:11 +0000 (14:50 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Nov 2019 17:00:01 +0000 (18:00 +0100)
commit3a9539e9ba18703b21b9aa398673179e9c5eabe5
tree3e3aa9dedbe17b5aa1f9d640cef7aab79e607bbd
parente0ecbca8ff27376cbaa68e5c64374344b85c760c
power: reset: at91-poweroff: do not procede if at91_shdwc is allocated

[ Upstream commit 9f1e44774be578fb92776add95f1fcaf8284d692 ]

There should be only one instance of struct shdwc in the system. This is
referenced through at91_shdwc. Return in probe if at91_shdwc is already
allocated.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/power/reset/at91-sama5d2_shdwc.c