2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 22:53:55 +08:00

ieee802154: || vs && in ieee802154_is_valid_extended_addr()

The ieee802154_is_valid_extended_addr() always returns true because
there is a typo.  The || should be &&.  Neither 0x0000000000000000ULL
nor 0xffffffffffffffffULL are valid addresses.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Dan Carpenter 2014-11-04 11:55:09 +03:00 committed by Marcel Holtmann
parent 980edbd503
commit 0d8a52f933

View File

@ -209,7 +209,7 @@ static inline bool ieee802154_is_valid_extended_addr(const __le64 addr)
* This is currently a workaround because neighbor discovery can't
* deal with short addresses types right now.
*/
return ((addr != cpu_to_le64(0x0000000000000000ULL)) ||
return ((addr != cpu_to_le64(0x0000000000000000ULL)) &&
(addr != cpu_to_le64(0xffffffffffffffffULL)));
}