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