Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: (cpts) fix a missing check of clk_prepare

clk_prepare() could fail, so let's check its status, and if it fails,
return its error code upstream.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Kangjie Lu and committed by
David S. Miller
2d822f2d 26fd962b

+3 -1
+3 -1
drivers/net/ethernet/ti/cpts.c
··· 590 590 return ERR_CAST(cpts->refclk); 591 591 } 592 592 593 - clk_prepare(cpts->refclk); 593 + ret = clk_prepare(cpts->refclk); 594 + if (ret) 595 + return ERR_PTR(ret); 594 596 595 597 cpts->cc.read = cpts_systim_read; 596 598 cpts->cc.mask = CLOCKSOURCE_MASK(32);