Re: [RESEND PATCH v3 07/32] media: v4l: async: Drop unneeded list entry initialisation

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

 



Hi Laurent,

On Tue, May 30, 2023 at 05:46:50AM +0300, Laurent Pinchart wrote:
> Hi Sakari,
> 
> Thank you for the patch.
> 
> On Thu, May 25, 2023 at 12:15:50PM +0300, Sakari Ailus wrote:
> > The list entry is initialised as a head in v4l2_async_register_subdev()
> > just before being added to the list. This isn't needed, drop the
> > initialisation.
> 
> Is this really unneeded ? Before the initialization and the list_add()
> call there are a few code paths that can access the async_list. For
> instance, the error path calls v4l2_async_cleanup(), which calls
> 
> 	list_del_init(&sd->async_list);
> 
> That won't work well on an uninitialized (or zero-initialized)
> list_head.

I think you're right, I'll drop this patch. This initialisation will be
removed in a later patch though, as the list will be redundant soon.

-- 
Regards,

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