Re: [PATCH 05/29] regulator: use IS_ERR_OR_NULL() instead of open-coding

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

 



On Thu, 3 May 2012, Mark Brown wrote:

> On Thu, May 03, 2012 at 05:05:34PM +0200, Guennadi Liakhovetski wrote:
> 
> > -	if (regulator == NULL || IS_ERR(regulator))
> > +	if (IS_ERR_OR_NULL(regulator))
> 
> The bigger question here is why we're accepting NULL in the first place.

No idea, you seem to be right - regulator_get() never returns NULL, so, it 
shouldn't be needed here. We could either remove this check altogether or 
change it to a BUG_OG().

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux