]> git.baikalelectronics.ru Git - kernel.git/commit
mfd: Avoid two assignments if failures happen in tps65910_i2c_probe
authorJesper Juhl <jj@chaosbits.net>
Wed, 13 Jul 2011 21:22:26 +0000 (23:22 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 31 Jul 2011 21:28:26 +0000 (23:28 +0200)
commit8a428c79e6d05c78fa7e2da19d887eeea63bc5d4
treee3edb8c7f024d5df4d90a1ecfbf171c10343d684
parentb03edb3716043b3f34d5082bdd33710971c9d5ce
mfd: Avoid two assignments if failures happen in tps65910_i2c_probe

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.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/tps65910.c