leds: trigger: panic: Don't register panic notifier if creating the trigger failed
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 16 Dec 2023 20:05:33 +0000 (21:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:30 +0000 (20:14 +0000)
commit029479d4f1bb9f79f00c1054d26876322abe676d
tree5ba8bb92c213a7773692a278b827706d9d94f2e1
parent6eef17a3c68745669776de32e72938d57fdb2a4b
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>
drivers/leds/trigger/ledtrig-panic.c