mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
Commit3bce3fdd1f("drm: rcar-du: Don't leak device_link to CMM") refactored CMM handling, and introduced an incorrect test for CMM availability. When no CMM is present, the rcrtc->cmm field is NULL, testing rcrtc->cmm->dev causes a NULL pointer dereference. This slipped through testing as all tests were run with the CMM present. Fix this issue by correctly testing for rcrtc->cmm. Fixes:3bce3fdd1f("drm: rcar-du: Don't leak device_link to CMM") Reported-by: Geert Uytterhoeven <[email protected]> Closes: https://lore.kernel.org/dri-devel/CAMuHMdXomz9GFDqkBjGX9Sda_GLccPcrihvFbOz0GAitDVNTbw@mail.gmail.com Signed-off-by: Laurent Pinchart <[email protected]> Tested-by: Geert Uytterhoeven <[email protected]> Link: https://patch.msgid.link/20260408124205.1962448-1-laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Tomi Valkeinen <[email protected]> (cherry picked from commit3e9a1da270) Signed-off-by: Tomi Valkeinen <[email protected]>