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:46:46 +0000 (18:46 +0100)
commit82d8a34470e96e192290885ffb54422b6f42700f
treea76bbd481f3e40acde33a8039768ff410ee42e94
parent1fb3d279a38471134e68dd7da647bc7eb9ae9513
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