lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 18 Aug 2020 12:08:42 +0300
From:   Kalle Valo <kvalo@...eaurora.org>
To:     Tang Bin <tangbin@...s.chinamobile.com>
Cc:     netdev@...r.kernel.org, linux-wireless@...r.kernel.org,
        davem@...emloft.net, ath10k@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ath10k: fix the status check and wrong return

Tang Bin <tangbin@...s.chinamobile.com> writes:

> 在 2020/8/17 22:26, Kalle Valo 写道:
>>> In the function ath10k_ahb_clock_init(), devm_clk_get() doesn't
>>> return NULL. Thus use IS_ERR() and PTR_ERR() to validate
>>> the returned value instead of IS_ERR_OR_NULL().
>> Why? What's the benefit of this patch? Or what harm does
>> IS_ERR_OR_NULL() create?
>
> Thanks for you reply, the benefit of this patch is simplify the code,
> because in
>
> this function, I don't think the situation of 'devm_clk_get() return
> NULL' exists.
>
> So please think about it, thanks.

I think you missed my comment below:

>> devm_clk_get() can return NULL if CONFIG_HAVE_CLK is disabled:
>>
>> static inline struct clk *devm_clk_get(struct device *dev, const char *id)
>> {
>> 	return NULL;
>> }

So I think this patch just creates a new bug and does not improve
anything.

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ