diff --git a/include/linux/dim.h b/include/linux/dim.h index 9fa4b3f88c39..2571da63877c 100644 --- a/include/linux/dim.h +++ b/include/linux/dim.h @@ -17,7 +17,7 @@ * We consider 10% difference as significant. */ #define IS_SIGNIFICANT_DIFF(val, ref) \ - (((100UL * abs((val) - (ref))) / (ref)) > 10) + ((ref) && (((100UL * abs((val) - (ref))) / (ref)) > 10)) /** * Calculate the gap between two values.