Re: [PATCH] regulator: core: Use IS_ERR_OR_NULL()

2015-08-20 Thread Viresh Kumar
On 20-08-15, 15:26, Arnd Bergmann wrote: > The use of IS_ERR_OR_NULL is almost always a bug (as is the open-coded > equivalent). > Please try to find out why this is done here and add a comment > if it's actually correct, or fix it if not. > > My guess is that it is not ok to pass an error pointer

Re: [PATCH] regulator: core: Use IS_ERR_OR_NULL()

2015-08-20 Thread Arnd Bergmann
On Monday 17 August 2015 12:30:58 Viresh Kumar wrote: > diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c > index 78387a6cbae5..55b49acfd9b3 100644 > --- a/drivers/regulator/core.c > +++ b/drivers/regulator/core.c > @@ -1595,7 +1595,7 @@ static void _regulator_put(struct regulator *r

Re: [PATCH] regulator: core: Use IS_ERR_OR_NULL()

2015-08-17 Thread Viresh Kumar
On 17-08-15, 13:06, Mark Brown wrote: > On Mon, Aug 17, 2015 at 12:30:58PM +0530, Viresh Kumar wrote: > > Use IS_ERR_OR_NULL() rather than open coding it. > > Neither of the patches you sent today applied cleanly against current > code, please submit patches against the tree they're intended to be

Re: [PATCH] regulator: core: Use IS_ERR_OR_NULL()

2015-08-17 Thread Mark Brown
On Mon, Aug 17, 2015 at 12:30:58PM +0530, Viresh Kumar wrote: > Use IS_ERR_OR_NULL() rather than open coding it. Neither of the patches you sent today applied cleanly against current code, please submit patches against the tree they're intended to be applied on. signature.asc Description: Digita

[PATCH] regulator: core: Use IS_ERR_OR_NULL()

2015-08-17 Thread Viresh Kumar
Use IS_ERR_OR_NULL() rather than open coding it. Signed-off-by: Viresh Kumar --- drivers/regulator/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 78387a6cbae5..55b49acfd9b3 100644 --- a/drivers/regulator/core.c