usb: typec: anx7411: Fix an array out of bounds
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 22 Jul 2022 06:25:42 +0000 (09:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jul 2022 12:26:39 +0000 (14:26 +0200)
commitcfed201e2db273562de152d22b74f74dee77e301
treeb93c1bf00b3310ac43543e693b7b3da70e76c1c8
parentff50a91ee5e6db357c900dce280a7129dc9e363c
usb: typec: anx7411: Fix an array out of bounds

This should be ARRAY_SIZE() instead of sizeof().  ARRAY_SIZE is
4 and  sizeof is 8.

Fixes: fe6d8a9c8e64 ("usb: typec: anx7411: Add Analogix PD ANX7411 support")
Reviewed-by: Xin Ji <xji@analogixsemi.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YtpC5s4/AD8vFz+X@kili
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/anx7411.c