Skip to content

Commit

Permalink
extcon: sm5502: Drop invalid register write in sm5502_reg_data
Browse files Browse the repository at this point in the history
[ Upstream commit d25b224 ]

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: 914b881 ("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>
  • Loading branch information
stephan-gh authored and gregkh committed Jul 14, 2021
1 parent b27d30b commit 3076d98
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/extcon/extcon-sm5502.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ static struct reg_data sm5502_reg_data[] = {
| SM5502_REG_INTM2_MHL_MASK,
.invert = true,
},
{ }
};

/* List of detectable cables */
Expand Down

0 comments on commit 3076d98

Please sign in to comment.