Hello Liu, On Thu Mar 26, 2026 at 10:36 AM CET, Liu Ying wrote:
>> --- a/drivers/gpu/drm/drm_bridge.c >> +++ b/drivers/gpu/drm/drm_bridge.c >> @@ -282,7 +282,7 @@ static void __drm_bridge_free(struct kref *kref) >> >> /** >> * drm_bridge_get - Acquire a bridge reference >> - * @bridge: DRM bridge >> + * @bridge: DRM bridge; if NULL this function does nothing >> * >> * This function increments the bridge's refcount. >> * >> @@ -300,7 +300,7 @@ EXPORT_SYMBOL(drm_bridge_get); >> >> /** >> * drm_bridge_put - Release a bridge reference >> - * @bridge: DRM bridge >> + * @bridge: DRM bridge; if NULL this function does nothing > > So, we can drop the if(_T) check for cleanup action, right? We could, but it's supposed to be there to help compiler optimizations: https://elixir.bootlin.com/linux/v7.0-rc5/source/include/linux/cleanup.h#L192-L207 > DEFINE_FREE(drm_bridge_put, struct drm_bridge *, if (_T) drm_bridge_put(_T)) > > Reviewed-by: Liu Ying <[email protected]> Thanks! Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
