summaryrefslogtreecommitdiffstats
path: root/drivers/ide/palm_bk3710.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-28 15:17:02 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-28 15:17:02 -0500
commit1993b176a8224e371e0732ffada7ab9eb3b0912b (patch)
treef437ed0a2f21386edee1886e8e6fd2f8f230c094 /drivers/ide/palm_bk3710.c
parentd4dc3b24427f91f112b18562dac73f7af60b7a21 (diff)
parent0d7ef45cdeebcc95d581703f45f6de7b2ee89b8d (diff)
downloadlinux-1993b176a8224e371e0732ffada7ab9eb3b0912b.tar.bz2
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
Pull IDE fixes from David Miller: "Just two small changes: 1) Remove bogus init annotation in icside, from Arnd Bergmann. 2) Don't use zero clock rates in palm_bk3710 driver, from Wolfram Sang" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide: ide: palm_bk3710: test clock rate to avoid division by 0 ide: icside: remove incorrect initconst annotation
Diffstat (limited to 'drivers/ide/palm_bk3710.c')
-rw-r--r--drivers/ide/palm_bk3710.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ide/palm_bk3710.c b/drivers/ide/palm_bk3710.c
index 8012e43bf8f6..46427ea01753 100644
--- a/drivers/ide/palm_bk3710.c
+++ b/drivers/ide/palm_bk3710.c
@@ -325,6 +325,8 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)
clk_enable(clk);
rate = clk_get_rate(clk);
+ if (!rate)
+ return -EINVAL;
/* NOTE: round *down* to meet minimum timings; we count in clocks */
ideclk_period = 1000000000UL / rate;