diff options
| author | Ivan Bornyakov <brnkv.i1@gmail.com> | 2018-05-25 13:49:52 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2018-05-29 09:59:53 -0400 |
| commit | f9c6442a8f0b1dde9e755eb4ff6fa22bcce4eabc (patch) | |
| tree | 4aaae2913584f690008cebd6b7594322e60872f7 /drivers/atm | |
| parent | 312564269535892cc082bc80592150cd1f5e8ec3 (diff) | |
atm: zatm: fix memcmp casting
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>
Diffstat (limited to 'drivers/atm')
| -rw-r--r-- | drivers/atm/zatm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c index 9c9a22958717..a8d2eb0ceb8d 100644 --- a/drivers/atm/zatm.c +++ b/drivers/atm/zatm.c | |||
| @@ -1151,8 +1151,8 @@ static void eprom_get_byte(struct zatm_dev *zatm_dev, unsigned char *byte, | |||
| 1151 | } | 1151 | } |
| 1152 | 1152 | ||
| 1153 | 1153 | ||
| 1154 | static unsigned char eprom_try_esi(struct atm_dev *dev, unsigned short cmd, | 1154 | static int eprom_try_esi(struct atm_dev *dev, unsigned short cmd, int offset, |
| 1155 | int offset, int swap) | 1155 | int swap) |
| 1156 | { | 1156 | { |
| 1157 | unsigned char buf[ZEPROM_SIZE]; | 1157 | unsigned char buf[ZEPROM_SIZE]; |
| 1158 | struct zatm_dev *zatm_dev; | 1158 | struct zatm_dev *zatm_dev; |
