1 From c4924e92442d7218bd725e47fa3988c73aae84c9 Mon Sep 17 00:00:00 2001
2 From: Dan Carpenter <dan.carpenter@oracle.com>
3 Date: Thu, 4 Feb 2016 14:36:09 +0300
4 Subject: extcon: max77843: Use correct size for reading the interrupt register
6 From: Dan Carpenter <dan.carpenter@oracle.com>
8 commit c4924e92442d7218bd725e47fa3988c73aae84c9 upstream.
10 The info->status[] array has 3 elements. We are using size
11 MAX77843_MUIC_IRQ_NUM (16) instead of MAX77843_MUIC_STATUS_NUM (3) as
14 Fixes: 135d9f7d135a ('extcon: max77843: Clear IRQ bits state before request IRQ')
15 Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
16 Reviewed-by: Jaewon Kim <jaewon02.kim@samsung.com>
17 Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
18 [cw00.choi: Modify the patch title]
19 Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
20 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23 drivers/extcon/extcon-max77843.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
26 --- a/drivers/extcon/extcon-max77843.c
27 +++ b/drivers/extcon/extcon-max77843.c
28 @@ -803,7 +803,7 @@ static int max77843_muic_probe(struct pl
29 /* Clear IRQ bits before request IRQs */
30 ret = regmap_bulk_read(max77843->regmap_muic,
31 MAX77843_MUIC_REG_INT1, info->status,
32 - MAX77843_MUIC_IRQ_NUM);
33 + MAX77843_MUIC_STATUS_NUM);
35 dev_err(&pdev->dev, "Failed to Clear IRQ bits\n");