aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorColin Ian King <[email protected]>2018-05-30 19:19:36 +0100
committerJonathan Cameron <[email protected]>2018-06-24 14:22:38 +0100
commit288320f6e9a254bb595b4783c9bdfcc7c0e73153 (patch)
tree76656df47366ae35d3d2ded240033c08c27457f7 /tools/perf/util/trace-event-scripting.c
parent13399ff25f179811ce9c1df1523eb39f9e4a4772 (diff)
iio: tsl2x7x/tsl2772: avoid potential division by zero
It may be possible for tsl2772_get_lux to return a zero lux value and hence a division by zero can occur when lux_val is zero. Check for this case and return -ERANGE to avoid the division by zero. Detected by CoverityScan, CID#1469484 ("Division or modulo by zero") Signed-off-by: Colin Ian King <[email protected]> Acked-by: Brian Masney <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions