Re: [PATCH] drm/tiny: sharp-memory: fix pointer error dereference

From: Uwe Kleine-König

Date: Mon Feb 16 2026 - 01:10:34 EST


On Sun, Feb 15, 2026 at 10:04:38PM -0600, Ethan Tidmore wrote:
> The function devm_drm_dev_alloc() returns a pointer error upon failure
> not NULL. Change null check to pointer error check.
>
> Detected by Smatch:
> drivers/gpu/drm/tiny/sharp-memory.c:549 sharp_memory_probe() error:
> 'smd' dereferencing possible ERR_PTR()
>
> Fixes: b8f9f21716fec ("drm/tiny: Add driver for Sharp Memory LCD")
> Signed-off-by: Ethan Tidmore <ethantidmore06@xxxxxxxxx>

Acked-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx>

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature