commit | 5ade39358f0244a0672860766eed92e8c908b805 | [log] [tgz] |
---|---|---|
author | Axel Lin <axel.lin@gmail.com> | Mon Apr 09 22:32:49 2012 +0800 |
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | Tue Apr 10 11:04:26 2012 +0100 |
tree | 6a8146beb7a0e542b2115de1579badd95d4f69fa | |
parent | 2e42a7dc407163dd99ab5741b6fd167877708623 [diff] |
regulator: twl-regulator: Simplify the code matching regulator id This patch makes the code easier to read. Also add checking the case when no desc id is matched. This is required because if no desc id is matched, the poiner info is pointed to twl_of_match[i].data which may be not NULL. Checking info is NULL or not latter does not catch the error. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>