Re: v4l2_device_register_subdev_nodes() clean_up code

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

 



Hi Krzysztof,

On Fri, May 30, 2014 at 02:44:26PM +0200, Krzysztof Czarnowski wrote:
> Hi,
> 
> In "clean_up:" section of v4l2_device_register_subdev_nodes() we have:
> 
>     if (!sd->devnode)
>         break;
> 
> Maybe I miss something, but shouldn't it be rather "continue" instead
> of "break"?

I believer you're right. Currently nodes that have been registered after the
first sub-device that had no node will not be unregistered.

Actually the entire check is useless. video_unregister_device() can take
NULL as argument, in which case it does nothing.

Would you like to send a patch? :-)

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ailus@xxxxxx	XMPP: sailus@xxxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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