]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net: ethernet: renesas: ravb_main: test clock rate to avoid division by 0
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Fri, 8 Apr 2016 11:28:42 +0000 (13:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Apr 2016 02:36:28 +0000 (22:36 -0400)
commita6d37131c02f15463daa00e2f1da6824e8e00de2
tree0b3a900478aa4e19e39f38c360c465cb01442c0e
parent60e19518d657018c4e25f0c20ca4f623536714b5
net: ethernet: renesas: ravb_main: test clock rate to avoid division by 0

The clk API may return 0 on clk_get_rate, so we should check the result before
using it as a divisor.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/ravb_main.c