aboutsummaryrefslogtreecommitdiff
path: root/include/linux/dim.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/dim.h')
-rw-r--r--include/linux/dim.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/dim.h b/include/linux/dim.h
index b698266d0035..6c5733981563 100644
--- a/include/linux/dim.h
+++ b/include/linux/dim.h
@@ -21,7 +21,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.