regulator: lp8788-buck: Silence build warning
authorAxel Lin <axel.lin@ingics.com>
Thu, 10 Jan 2013 02:33:06 +0000 (10:33 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 10 Jan 2013 12:56:57 +0000 (12:56 +0000)
commiteb758de6a00f2c1f5694efc503b94d162db99734
tree713aa1ab67940f56fafeba72e66cea2a5b3058d6
parentb9bb09111a4f5dbf8a0bd7df77ec79d3fdf9e5d2
regulator: lp8788-buck: Silence build warning

This driver use id as array index, thus add bounder checking for id.

This patch fixes below build warning:
drivers/regulator/lp8788-buck.c: In function 'lp8788_buck_probe':
drivers/regulator/lp8788-buck.c:490:8: warning: array subscript is above array bounds [-Warray-bounds]
drivers/regulator/lp8788-buck.c:489:63: warning: array subscript is above array bounds [-Warray-bounds]

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/lp8788-buck.c