Re: [PATCH v2] [media] staging/imx: remove confusing IS_ERR_OR_NULL usage

2017-07-12 Thread Steve Longerbeam
On 07/12/2017 08:50 AM, Philipp Zabel wrote: On Tue, 2017-07-11 at 15:18 +0200, Arnd Bergmann wrote: While looking at a compiler warning, I noticed the use of IS_ERR_OR_NULL, which is generally a sign of a bad API design and should be avoided. In this driver, this is fairly easy, we can

Re: [PATCH v2] [media] staging/imx: remove confusing IS_ERR_OR_NULL usage

2017-07-12 Thread Philipp Zabel
On Tue, 2017-07-11 at 15:18 +0200, Arnd Bergmann wrote: > While looking at a compiler warning, I noticed the use of > IS_ERR_OR_NULL, which is generally a sign of a bad API design > and should be avoided. > > In this driver, this is fairly easy, we can simply stop storing > error pointers in

[PATCH v2] [media] staging/imx: remove confusing IS_ERR_OR_NULL usage

2017-07-11 Thread Arnd Bergmann
While looking at a compiler warning, I noticed the use of IS_ERR_OR_NULL, which is generally a sign of a bad API design and should be avoided. In this driver, this is fairly easy, we can simply stop storing error pointers in persistent structures, and change the two functions that might return