[PATCH -next] tty: of_serial: fix return value check in of_platform_serial_setup()

2012-11-04 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function clk_get() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- dr

Re: [PATCH -next] tty: of_serial: fix return value check in of_platform_serial_setup()

2012-11-15 Thread Grant Likely
On Thu, 1 Nov 2012 13:27:34 +0800, Wei Yongjun wrote: > From: Wei Yongjun > > In case of error, the function clk_get() returns ERR_PTR() > and never returns NULL. The NULL test in the return value > check should be replaced with IS_ERR(). > > dpatch engine is used to auto generate this patch. >

Re: [PATCH -next] tty: of_serial: fix return value check in of_platform_serial_setup()

2012-11-15 Thread Greg KH
On Thu, Nov 15, 2012 at 12:08:11PM +, Grant Likely wrote: > On Thu, 1 Nov 2012 13:27:34 +0800, Wei Yongjun wrote: > > From: Wei Yongjun > > > > In case of error, the function clk_get() returns ERR_PTR() > > and never returns NULL. The NULL test in the return value > > check should be replace

Re: [PATCH -next] tty: of_serial: fix return value check in of_platform_serial_setup()

2012-11-15 Thread Wei Yongjun
On 11/15/2012 08:08 PM, Grant Likely wrote: > On Thu, 1 Nov 2012 13:27:34 +0800, Wei Yongjun wrote: >> From: Wei Yongjun >> >> In case of error, the function clk_get() returns ERR_PTR() >> and never returns NULL. The NULL test in the return value >> check should be replaced with IS_ERR(). >> >> d

Re: [PATCH -next] tty: of_serial: fix return value check in of_platform_serial_setup()

2012-11-01 Thread Murali Karicheri
On 11/01/2012 01:27 AM, Wei Yongjun wrote: From: Wei Yongjun In case of error, the function clk_get() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). dpatch engine is used to auto generate this patch. (https://github.com/weiyj

Re: [PATCH -next] tty: of_serial: fix return value check in of_platform_serial_setup()

2012-11-01 Thread Alan Cox
> > "clk or clock-frequency not > > defined\n"); > > - return -ENODEV; > > + return PTR_ERR(info->clk); > I think this is wrong. it should return -ENODEV; Returning the clock error at least ensures the real reason for the fail is rep