Re: [PATCH v12 06/19] media: v4l2-fwnode: add initial connector parsing support

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

 



Hi Marco,

On Mon, Mar 09, 2020 at 11:14:15AM +0100, Marco Felsch wrote:
...
> +void v4l2_fwnode_connector_free(struct v4l2_fwnode_connector *connector)
> +{
> +	struct v4l2_connector_link *link, *tmp;
> +
> +	if (IS_ERR_OR_NULL(connector) ||
> +	    connector->type == V4L2_CONN_UNKNOWN)
> +		return;
> +
> +	list_for_each_entry_safe(link, tmp, &connector->links, head) {
> +		v4l2_fwnode_put_link(&link->fwnode_link);
> +		list_del(&link->head);
> +		kfree(link);
> +	}
> +
> +	kfree(connector->label);
> +	connector->label = NULL;
> +	connector = NULL;

No need to set connector NULL here.

> +}

-- 
Sakari Ailus



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux