mfd: dln2: More sanity checking for endpoints
authorOliver Neukum <oneukum@suse.com>
Thu, 21 Nov 2019 10:28:10 +0000 (11:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2020 21:30:59 +0000 (16:30 -0500)
commit2b8aa1bd6033cfada4d420824dc444cc1ef02dff
treea2334e35f7b56ab9718f2c73b63bb7acac62196e
parentf873437547ac3d092c433cc0a996b946eb2803b6
mfd: dln2: More sanity checking for endpoints

commit 2b8bd606b1e60ca28c765f69c1eedd7d2a2e9dca upstream.

It is not enough to check for the number of endpoints.
The types must also be correct.

Reported-and-tested-by: syzbot+48a2851be24583b864dc@syzkaller.appspotmail.com
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mfd/dln2.c