mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
net: ethernet: ti: cpts: Handle error for clk_enable
[ Upstream commit6babfc6e6f] As the potential failure of the clk_enable(), it should be better to check it and return error if fails. Fixes:8a2c9a5ab4("net: ethernet: ti: cpts: rework initialization/deinitialization") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5e42f90d72
commit
b3e4fcb539
@@ -568,7 +568,9 @@ int cpts_register(struct cpts *cpts)
|
||||
for (i = 0; i < CPTS_MAX_EVENTS; i++)
|
||||
list_add(&cpts->pool_data[i].list, &cpts->pool);
|
||||
|
||||
clk_enable(cpts->refclk);
|
||||
err = clk_enable(cpts->refclk);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
cpts_write32(cpts, CPTS_EN, control);
|
||||
cpts_write32(cpts, TS_PEND_EN, int_enable);
|
||||
|
||||
Reference in New Issue
Block a user