OSDN Git Service

atm: zatm: fix memcmp casting
authorIvan Bornyakov <brnkv.i1@gmail.com>
Fri, 25 May 2018 17:49:52 +0000 (20:49 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jul 2018 09:21:24 +0000 (11:21 +0200)
commitacf477d528bfd2793ac8d13ff4368fa8e2e90c70
tree8b793286c1eadcb8d5f36f0dfeb49d97d406a878
parent24a04933972ad73ab15544bdc2cda290171e1344
atm: zatm: fix memcmp casting

[ Upstream commit f9c6442a8f0b1dde9e755eb4ff6fa22bcce4eabc ]

memcmp() returns int, but eprom_try_esi() cast it to unsigned char. One
can lose significant bits and get 0 from non-0 value returned by the
memcmp().

Signed-off-by: Ivan Bornyakov <brnkv.i1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/atm/zatm.c