summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/renesas/ravb_main.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-04-27 17:30:49 +0200
committerTakashi Iwai <tiwai@suse.de>2016-04-27 17:30:49 +0200
commitaf9cc93c0dee5fc1f9fa32cd9d79a456738a21be (patch)
tree91aed45708ad9782de42560ecd25ea5f740dae9b /drivers/net/ethernet/renesas/ravb_main.c
parentbb03ed216370cb021f377f923471e56d1de3ff5d (diff)
parent8c0f55100478649e3c0133684aa4aebab77ce10f (diff)
Merge tag 'asoc-fix-v4.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v4.6 This is a fairly large collection of fixes but almost all driver specific ones, especially to the new Intel drivers which have had a lot of recent development. The one core fix is a change to the debugfs code to avoid crashes in some relatively unusual configurations.
Diffstat (limited to 'drivers/net/ethernet/renesas/ravb_main.c')
-rw-r--r--drivers/net/ethernet/renesas/ravb_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index 087e14a3fba7..9e2a0bd8f5a8 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -1691,6 +1691,9 @@ static int ravb_set_gti(struct net_device *ndev)
rate = clk_get_rate(clk);
clk_put(clk);
+ if (!rate)
+ return -EINVAL;
+
inc = 1000000000ULL << 20;
do_div(inc, rate);