leds: trigger: panic: Don't register panic notifier if creating the trigger failed
[ Upstream commit afacb21834bb02785ddb0c3ec197208803b74faa ]
It doesn't make sense to register the panic notifier if creating the
panic trigger failed.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/8a61e229-5388-46c7-919a-4d18cc7362b2@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 6c0a90374357d7bc3fde5fc096ae996699e4eb22)
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
1 file changed