mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
atm: zatm: fix memcmp casting
[ Upstream commit f9c6442a8f ]
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>
This commit is contained in:
parent
24a0493397
commit
acf477d528
|
|
@ -1149,8 +1149,8 @@ static void eprom_get_byte(struct zatm_dev *zatm_dev, unsigned char *byte,
|
|||
}
|
||||
|
||||
|
||||
static unsigned char eprom_try_esi(struct atm_dev *dev, unsigned short cmd,
|
||||
int offset, int swap)
|
||||
static int eprom_try_esi(struct atm_dev *dev, unsigned short cmd, int offset,
|
||||
int swap)
|
||||
{
|
||||
unsigned char buf[ZEPROM_SIZE];
|
||||
struct zatm_dev *zatm_dev;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user