Re: [PATCH] fbdev: s3c-fb: Fix potential registration corruption on probe failure

From: Helge Deller

Date: Wed Nov 18 2026 - 13:17:44 EST


On 11/18/26 15:22, Guangshuo Li wrote:
Probe failure cleanup calls unregister_framebuffer() even when the
window has not been registered. Its zero-initialized node can then
remove another framebuffer from registered_fb[0].

Track successful registration and only unregister those framebuffers.
Also skip empty window slots while unwinding a failed probe.

This issue was found by our static analysis tool under development.

I think s3c_fb_probe_win() needs to clean up when some things
like cmap fail to be allocated.
Your patch seems to just work around one of the possible pitfalls.

Helge