Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1507083

Re: [PATCH] clk: keystone: Fix an error checking

From Dan Carpenter <dan.carpenter@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCH] clk: keystone: Fix an error checking
Date 2016-10-24 12:40 +0200
Message-ID <svKPD-6q5-7@gated-at.bofh.it> (permalink)
References <svmaB-6Vi-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, Oct 23, 2016 at 10:12:49AM +0200, Christophe JAILLET wrote:
> clk_register_pll() can return ERR_PTR(-ENOMEM) so here the check against
> NULL only is not correct.
> 

Change the ERR_PTR(-ENOMEM) to a NULL instead.  When we mix error
pointers and NULL, what it means is that NULL should be treated as a
success case.  That's not the case here, so we should just return NULL
since we don't actually care about the error codes.

regards,
dan carpenter

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] clk: keystone: Fix an error checking Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-10-23 10:20 +0200
  Re: [PATCH] clk: keystone: Fix an error checking Dan Carpenter <dan.carpenter@oracle.com> - 2016-10-24 12:40 +0200
    Re: [PATCH] clk: keystone: Fix an error checking Lars-Peter Clausen <lars@metafoo.de> - 2016-10-24 12:50 +0200
      Re: [PATCH] clk: keystone: Fix an error checking Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-10-24 22:20 +0200

csiph-web