+// SPDX-License-Identifier: GPL-2.0+
/*
* Porting to u-boot:
*
* Linux IPU driver for MX51:
*
* (C) Copyright 2005-2010 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
/* #define DEBUG */
int clk_set_rate(struct clk *clk, unsigned long rate)
{
- if (clk && clk->set_rate)
+ if (!clk)
+ return 0;
+
+ if (clk->set_rate)
clk->set_rate(clk, rate);
+
return clk->rate;
}