Skip to content
Commit 447bdaa5 authored by Andriy Gelman's avatar Andriy Gelman Committed by Fabio Baltieri
Browse files

drivers: ethernet: eth_sam_gmac: Fix ptp adjust



NSEC_PER_SEC is an unsigned literal which will promote variable increment
to unsigned for the comparison operation, thus returning -EINVAL for
negative increment values.

For positive increment, -NSEC_PER_SEC becomes a large unsigned value
which will also return -EINVAL.

Fix by casting NSEC_PER_SEC to an int.

Signed-off-by: default avatarAndriy Gelman <andriy.gelman@gmail.com>
parent 4c035af0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment