[PATCH v2 1/5] drm/modes: parse_cmdline: Handle empty mode name part

Maxime Ripard maxime at cerno.tech
Thu Jul 14 12:05:00 UTC 2022


Hi,

On Thu, Jul 14, 2022 at 11:04:06AM +0200, Geert Uytterhoeven wrote:
> If no mode name part was specified, mode_end is zero, and the "ret ==
> mode_end" check does the wrong thing.
> 
> Fix this by skipping all named mode handling when mode_end is zero.
> 
> Fixes: 7b1cce760afe38b4 ("drm/modes: parse_cmdline: Allow specifying stand-alone options")
> Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
> Reviewed-by: Hans de Goede <hdegoede at redhat.com>
> Acked-by: Thomas Zimmermann <tzimmermann at suse.de>

We should add a test for that in drivers/gpu/drm/tests/drm_cmdline_parser_test.c

Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20220714/4bb66e1f/attachment.sig>


More information about the dri-devel mailing list