Re: [PATCH] media: v4l2-dev: fix media controller registration error handling
From: Shih-Sheng Yang
Date: Tue Jun 30 2026 - 05:58:12 EST
Hi Laurent,
Thank you for the review.
I've addressed this in v2 by moving the NULL check into
media_devnode_remove() and by using device_unregister() in
__video_register_device(), as device_register() has already succeeded
there.
I also checked the other media_devnode_remove() callers. I didn't find
another caller with the same failure pattern or an immediate risk that
requires changing the helper API. Since changing media_devnode_remove()
to take a pointer-to-pointer would affect a wider set of callers, I have
left that out of v2. I can add it if you prefer.
Regards,
Shih-Sheng