diff options
author | Bryan O'Donoghue <pure.logic@nexus-software.ie> | 2017-07-28 14:22:57 +0100 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2017-08-02 10:26:40 +0200 |
commit | 791eccd94965a8029ae09c5530bcb9a76794e408 (patch) | |
tree | 0e2d8503a9d657df9a5fed39946d07dde81e1556 /tools/perf/scripts/python/call-graph-from-sql.py | |
parent | f7f8c1756e9a5f1258a7cc6b663f8451b724900f (diff) |
mtd: nand: sunxi: fix potential divide-by-zero error
clk_round_rate() can return <= 0. Currently the value returned by
clk_round_rate() is used directly for a division. This patch introduces a
guard to ensure a divide-by-zero or a divide by a negative number for that
matter can't happen by bugging out returning -EINVAL if clk_round_rate()
returns <= 0.
Fixes: 2d43457f79e4 ("mtd: nand: sunxi: fix EDO mode selection")
Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions