Thanks Fabio for review, This make sense, I'll try to change my code that way. On 11/30/2017 08:07 PM, Fabio Estevam wrote: > Hi Hugues, > > On Wed, Nov 29, 2017 at 3:11 PM, Hugues Fruchet <hugues.fruchet@xxxxxx> wrote: > >> /* read exposure, in number of line periods */ >> static int ov5640_get_exposure(struct ov5640_dev *sensor) >> { >> @@ -1562,6 +1586,10 @@ static int ov5640_set_power(struct ov5640_dev *sensor, bool on) >> ov5640_reset(sensor); >> ov5640_power(sensor, true); >> >> + ret = ov5640_check_chip_id(sensor); >> + if (ret) >> + goto power_off; > > Wouldn't it make more sense to add this check in ov5640_probe() > function instead? > Best regards, Hugues.