mirror of
https://github.com/torvalds/linux.git
synced 2026-10-26 20:46:02 +01:00
drm/panic: Return -EINVAL if font is not available
Font lookup does not allocate memory. Hence reporting ENOMEM on failed lookups is misleading. Report EINVAL instead. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patch.msgid.link/20260911124540.279841-4-tzimmermann@suse.de
This commit is contained in:
parent
6a6304ec3c
commit
e2b01faedb
|
|
@ -751,8 +751,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 || !qrbuf1 || !qrbuf2 || !stream.workspace)
|
||||
if (!qrbuf1 || !qrbuf2 || !stream.workspace)
|
||||
return -ENOMEM;
|
||||
if (!font)
|
||||
return -EINVAL;
|
||||
|
||||
r_screen = DRM_RECT_INIT(0, 0, sb->width, sb->height);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user