i2c_probe: limit slave addresses to [0x04, 0x77]
Adresses below 0x04 and above 0x77 are reserved in the i2c bus
specification, so don't probe these addresses unless requested
explicitly.

Also do more strict boundary checking:

 - ensure start address is greater or equal to zero;
 - don't decrease stopaddr after checking it being greater or equal to
   startaddr.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 5d966f7 commit d4c88b90c558d595bec49de933052ad855da5c69
@Uwe Kleine-König Uwe Kleine-König authored on 25 Jan 2019
Sascha Hauer committed on 28 Jan 2019
Showing 1 changed file
View
commands/i2c.c