Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1513578
| From | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/3] clk: keystone: Fix an error checking |
| Date | 2016-11-02 01:30 +0100 |
| Message-ID | <syRBf-7p6-7@gated-at.bofh.it> (permalink) |
| References | <svUlY-4eX-5@gated-at.bofh.it> <svUlY-4eX-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 10/24, Christophe JAILLET wrote: > clk_register_pll() can return ERR_PTR(-ENOMEM) so checking the return value > against NULL only is not correct. The code just doesn't propagate the error up to the caller. Instead the caller treats NULL as an error and non-NULL as valid. If the callee detects an error it hides it and returns NULL. > In order to fix it, update clk_register_pll() to always return an error > pointer in case of error and check the return value with IS_ERR. > > While at it, also fix a tab vs space in the surrounding code. > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> > --- > Un-compiled and un-tested. Please at least compile test patches. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH 1/3] clk: keystone: Fix an error checking Stephen Boyd <sboyd@codeaurora.org> - 2016-11-02 01:30 +0100 Re: [PATCH 1/3] clk: keystone: Fix an error checking Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-11-04 06:50 +0100
csiph-web