regulator: mpq7920: Check the correct variable in mpq7920_regulator_register()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 13 Jan 2020 12:59:33 +0000 (15:59 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 13 Jan 2020 15:02:48 +0000 (15:02 +0000)
commit7eec67869893bc34bd3a3126e5124a4ef017e0cd
treef39cdefe8c1935e40f383d384f7c54589e7490ed
parent686f63616f4aede1356c1bc9fa4e9a92a123bcd6
regulator: mpq7920: Check the correct variable in mpq7920_regulator_register()

There is a typo in the error checking.  We should be checking
"->rdev[i]" instead of just "->rdev".

Fixes: 6501c1f54a17 ("regulator: mpq7920: add mpq7920 regulator driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200113125805.xri6jqoxy2ldzqyg@kili.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/mpq7920.c