Hello,
On Fri, Sep 25, 2026 at 08:36:08PM +0800, Jiale Yao wrote:
> SPI driver_override allows a device to bind to this driver without
> matching either the OF or SPI device ID table. In that case,
> spi_get_device_match_data() returns NULL.
>
> sharp_memory_probe() immediately dereferences the returned display mode
> to calculate the pitch and transmit buffer size, causing a NULL pointer
> dereference.
>
> Commit 572a00852635 ("iio: dac: ad5686: missing NULL check on match
> data") fixed the same driver_override issue in another SPI driver.
> Reject devices without match data before using the display mode.
>
> Fixes: b8f9f21716fe ("drm/tiny: Add driver for Sharp Memory LCD")
> Cc: [email protected]
> Signed-off-by: Jiale Yao <[email protected]>Note there is an effort to make it impossible to use driver_override in the core and only allow a few dedicated drivers. (See https://lore.kernel.org/lkml/[email protected]/) That should make your effort to implement that check in all the driver redundant. Best regards Uwe
signature.asc
Description: PGP signature
