Re: [PATCH v3 7/9] staging: media: atmel: use for_each_endpoint_of_node()

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

 



Hi Dan

> > -	while (1) {
> > +	for_each_endpoint_of_node(np, epn) {
> >  		struct v4l2_fwnode_endpoint v4l2_epn = { .bus_type = 0 };
> >  
> > -		epn = of_graph_get_next_endpoint(np, epn);
> > -		if (!epn)
> > -			return 0;
> > -
> >  		ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(epn),
> >  						 &v4l2_epn);
> >  		if (ret) {
> 
> This introduces a Smatch warning because now "ret" is uninitialized if
> the for_each_endpoint_of_node() list is empty.  Is that something which
> is possible?
> 
> I've been meaning to make a list of loops which always iterate at least
> one time.  for_each_cpu() etc.

Oh, OK thank you for pointing it.
I will fixup and post it next week

Thank you for your help !!
Best regards
---
Kuninori Morimoto




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux