fbdev: Fix logic error in "offb" name match

commit 15df28699b upstream.

A regression was reported to me recently whereby /dev/fb0 had disappeared
from a PowerBook G3 Series "Wallstreet". The problem shows up when the
"video=ofonly" parameter is passed to the kernel, which is what the
bootloader does when "no video driver" is selected. The cause of the
problem is the "offb" string comparison, which got mangled when it got
refactored. Fix it.

Cc: stable@vger.kernel.org
Fixes: 93604a5ade ("fbdev: Handle video= parameter in video/cmdline.c")
Reported-and-tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@linux-m68k.org>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Finn Thain
2025-10-09 09:56:25 +11:00
committed by Greg Kroah-Hartman
parent 1325791c40
commit 7819c94b51

View File

@@ -40,7 +40,7 @@ int fb_get_options(const char *name, char **option)
bool enabled; bool enabled;
if (name) if (name)
is_of = strncmp(name, "offb", 4); is_of = !strncmp(name, "offb", 4);
enabled = __video_get_options(name, &options, is_of); enabled = __video_get_options(name, &options, is_of);