Re: [PATCH v2 04/17] smiapp: Split off sub-device registration into two

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

 



Hi,

On Thu, Sep 15, 2016 at 02:22:18PM +0300, Sakari Ailus wrote:
> Remove the loop in sub-device registration and create each sub-device
> explicitly instead.

Reviewed-By: Sebastian Reichel <sre@xxxxxxxxxx>

> +static int smiapp_register_subdevs(struct smiapp_sensor *sensor)
> +{
> +	int rval;
> +
> +	if (sensor->scaler) {
> +		rval = smiapp_register_subdev(
> +			sensor, sensor->binner, sensor->scaler,
> +			SMIAPP_PAD_SRC, SMIAPP_PAD_SINK,
> +			MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE);
> +		if (rval < 0)
>  			return rval;
> -		}
>  	}
>  
> -	return 0;
> +	return smiapp_register_subdev(
> +		sensor, sensor->pixel_array, sensor->binner,
> +		SMIAPP_PA_PAD_SRC, SMIAPP_PAD_SINK,
> +		MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE);
>  }

I haven't looked at the remaining code, but is sensor->scaler
stuff being cleaned up properly if the binner part fails?

-- Sebastian

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