Skip to content
Commit 7f83d410 authored by Michał Kępień's avatar Michał Kępień Committed by Darren Hart (VMware)
Browse files

platform/x86: fujitsu-laptop: Simplify error paths



Replace the last few lines of acpi_fujitsu_bl_add() with a simple return
in order to improve code readability without changing the logic.

As acpi_fujitsu_laptop_add() uses a managed memory allocation for
device-specific data, it is fine to just return immediately upon kfifo
allocation failure.  Do that instead of jumping to the end of the
function to improve code readability.  Running out of memory while
allocating the kfifo does not seem probable enough to warrant logging an
error message, so do not do it.

Signed-off-by: default avatarMichał Kępień <kernel@kempniu.pl>
Reviewed-by: default avatarJonathan Woithe <jwoithe@just42.net>
Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
parent a7a1ccbe
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment