]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
extcon: sm5502: Drop invalid register write in sm5502_reg_data
authorStephan Gerhold <stephan@gerhold.net>
Mon, 31 May 2021 13:34:35 +0000 (15:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:22:36 +0000 (16:22 +0200)
commit8ef2d9dbb6a54da889e4711ef294e7c3dcec2aab
tree626a1d1f9abc3bfadcc28005a8286e0245fb6fb1
parent3a51c72f42485db0a3821b4a1aef550f58ed1419
extcon: sm5502: Drop invalid register write in sm5502_reg_data

[ Upstream commit d25b224f8e5507879b36a769a6d1324cf163466c ]

When sm5502_init_dev_type() iterates over sm5502_reg_data to
initialize the registers it is limited by ARRAY_SIZE(sm5502_reg_data).
There is no need to add another empty element to sm5502_reg_data.

Having the additional empty element in sm5502_reg_data will just
result in writing 0xff to register 0x00, which does not really
make sense.

Fixes: 914b881f9452 ("extcon: sm5502: Add support new SM5502 extcon device driver")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/extcon/extcon-sm5502.c