[PATCH 03/12] drm/panic: Return -EINVAL if font is not available
Jocelyn Falempe
jfalempe at redhat.com
Thu Aug 20 10:04:51 PDT 2026
On 18/08/2026 14:28, Thomas Zimmermann wrote:
> Font lookup does not allocate memory. Hence reporting ENOMEM on
> failed lookups is misleading. Report EINVAL instead.
Thanks, it looks good to me.
Reviewed-by: Jocelyn Falempe <jfalempe at redhat.com>
>
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
> ---
> drivers/gpu/drm/drm_panic.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c
> index 705b72bf0d83..96d238bfceee 100644
> --- a/drivers/gpu/drm/drm_panic.c
> +++ b/drivers/gpu/drm/drm_panic.c
> @@ -757,8 +757,10 @@ static int _draw_panic_screen_qr_code(struct drm_scanout_buffer *sb)
> int qr_width, qr_canvas_width, qr_pitch, v_margin;
> u8 *qr_image;
>
> - if (!font || !stream.workspace)
> + if (!stream.workspace)
> return -ENOMEM;
> + if (!font)
> + return -EINVAL;
>
> r_screen = DRM_RECT_INIT(0, 0, sb->width, sb->height);
>
More information about the linux-arm-kernel
mailing list