Re: [PATCH 1/7] omap3isp: Ignore endpoints with invalid configuration

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

 



Hi,

On Tue, Jul 18, 2017 at 01:01:10AM +0300, Sakari Ailus wrote:
> If endpoint has an invalid configuration, ignore it instead of happily
> proceeding to use it nonetheless. Ignoring such an endpoint is better than
> failing since there could be multiple endpoints, only some of which are
> bad.

I would expect a dev_warn(dev, "Ignore endpoint (broken configuration)!");

-- Sebastian

> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
> Tested-by: Pavel Machek <pavel@xxxxxx>
> ---
>  drivers/media/platform/omap3isp/isp.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
> index db2cccb57ceb..441eba1e02eb 100644
> --- a/drivers/media/platform/omap3isp/isp.c
> +++ b/drivers/media/platform/omap3isp/isp.c
> @@ -2110,10 +2110,12 @@ static int isp_fwnodes_parse(struct device *dev,
>  		if (!isd)
>  			goto error;
>  
> -		notifier->subdevs[notifier->num_subdevs] = &isd->asd;
> +		if (isp_fwnode_parse(dev, fwnode, isd)) {
> +			devm_kfree(dev, isd);
> +			continue;
> +		}
>  
> -		if (isp_fwnode_parse(dev, fwnode, isd))
> -			goto error;
> +		notifier->subdevs[notifier->num_subdevs] = &isd->asd;
>  
>  		isd->asd.match.fwnode.fwnode =
>  			fwnode_graph_get_remote_port_parent(fwnode);
> -- 
> 2.11.0
> 

Attachment: signature.asc
Description: PGP signature


[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