Re: [PATCH] clk: tegra: fix return value check in tegra_clk_register_pllc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/28/2013 08:07 PM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
> 
> In case of error, the function __clk_lookup() returns NULL pointer
> not ERR_PTR(). The IS_ERR() test in the return value check should
> be replaced with NULL test.

>  	parent = __clk_lookup(parent_name);
> -	if (IS_ERR(parent)) {
> +	if (!parent) {

clk_get() returns an error-value. It'd be nice if the internal clk APIs
all did the same for consistency... Otherwise, the clock subsystem is
essentially using both NULL and error-values as errors, which is rather
frowned upon.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux