Re: [PATCH v2] media: v4l2-core: fix entity initialization in device_register_subdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 26, 2020 at 05:28:16PM +0200, Eugen Hristev wrote:
> The entity variable was being initialized in the wrong place, before the
> parameters have been checked.
> To solve this, completely removed the entity variable and replaced it
> with the initialization value : &sd->entity.
> This will avoid dereferencing 'sd' pointer before it's being checked if
> it's NULL.
> 
> Fixes: 61f5db549dde ("[media] v4l: Make v4l2_subdev inherit from media_entity")
> Signed-off-by: Eugen Hristev <eugen.hristev@xxxxxxxxxxxxx>

Thanks!

Acked-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>

-- 
Sakari Ailus



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux