]> git.baikalelectronics.ru Git - kernel.git/commit
drm/bridge: sii902x: re-order conditions to prevent out of bounds read
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 7 Jun 2019 07:27:04 +0000 (10:27 +0300)
committerAndrzej Hajda <a.hajda@samsung.com>
Fri, 7 Jun 2019 13:01:18 +0000 (15:01 +0200)
commit764eea4b2898f23bb39b54615238bdbb3dd63e8c
tree95957d5e239518c0294ac10d3c8b001ad4401df8
parentf35f5404acdb96da1a4ac71173c7b9de32d4f986
drm/bridge: sii902x: re-order conditions to prevent out of bounds read

This should check that "i" is within bounds before checking reading from
the array.

Fixes: 38292fa0a13c ("drm/bridge: sii902x: Implement HDMI audio support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190607072704.GA25229@mwanda
drivers/gpu/drm/bridge/sii902x.c