summaryrefslogtreecommitdiff
path: root/drivers/extcon
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2021-05-31 15:34:35 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-14 16:53:46 +0200
commit4efa7f728bab9f96ee4ee4df653189a6569cf249 (patch)
tree29ea1d5a4cdaad8ad3c359aa06175989ba710807 /drivers/extcon
parentb1c88a56ef6e6f455a110d20e420d565b9cb344e (diff)
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>
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon-sm5502.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/extcon/extcon-sm5502.c b/drivers/extcon/extcon-sm5502.c
index b3d93baf4fc5..f883992800b3 100644
--- a/drivers/extcon/extcon-sm5502.c
+++ b/drivers/extcon/extcon-sm5502.c
@@ -88,7 +88,6 @@ static struct reg_data sm5502_reg_data[] = {
| SM5502_REG_INTM2_MHL_MASK,
.invert = true,
},
- { }
};
/* List of detectable cables */