Re: [PATCH] mfd: avoid two assignments if failures happen intps65910_i2c_probe

From: Samuel Ortiz
Date: Wed Jul 27 2011 - 05:51:44 EST


Hi Jesper,

On Wed, Jul 13, 2011 at 11:22:26PM +0200, Jesper Juhl wrote:
> In drivers/mfd/tps65910.c:tps65910_i2c_probe() there's potential for a
> tiny optimization.
>
> We assign to init_data->irq and init_data->irq_base long before we
> need them, and there are two potential exits from the function before
> they are needed.
>
> Moving the assignments below these two potential exits means we
> completely avoid doing them in these two (failure) cases.
Patch applied, thanks.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/