On Wed, 2011-11-16 at 11:37 +0100, Laurent Pinchart wrote:
> > @@ -812,13 +814,12 @@ static int as3645a_probe(struct i2c_client *client,
> >
> > flash->led_mode = V4L2_FLASH_LED_MODE_NONE;
> >
> > - ret = as3645a_init_controls(flash);
> > - if (ret < 0) {
> > - kfree(flash);
> > - return ret;
> > - }
> > -
>
> Would you mind if I replace this code below
>
> > return 0;
> > +
> > +free_and_quit:
> > + v4l2_ctrl_handler_free(&flash->ctrls);
> > + kfree(flash);
> > + return ret;
>
> with
>
> done:
> if (ret < 0) {
> v4l2_ctrl_handler_free(&flash->ctrls);
> kfree(flash);
> }
>
> return ret;
>
I'm okay with it. However, I don't know if the compiler could optimize
double check here.
--
Andy Shevchenko <[email protected]>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html