clk: imx: pllv3: fix potential 'divide by zero' in sys_get_rate()
authorGiulio Benetti <giulio.benetti@benettiengineering.com>
Fri, 17 Jan 2020 12:06:40 +0000 (13:06 +0100)
committerLukasz Majewski <lukma@denx.de>
Sun, 26 Jan 2020 20:57:08 +0000 (21:57 +0100)
commit3391e7772933da74b488c761a2e444b9899cbd2a
tree32734249dcfd101ab95c1f6d35248fb686bcc7f5
parent90cbfa50c2b85d60f41d5e9852141058e5bad3ac
clk: imx: pllv3: fix potential 'divide by zero' in sys_get_rate()

Guard 'parent_rate==0' to prevent 'divide by zero' issue in
clk_pplv3_sys_get_rate(). If it is 0, let's return with -EINVAL.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
drivers/clk/imx/clk-pllv3.c