]> git.karo-electronics.de Git - karo-tx-linux.git/commit
can: mscan-mpc5xxx: fix return value check in mpc512x_can_get_clock()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 21 Sep 2012 07:09:47 +0000 (15:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Oct 2012 15:27:26 +0000 (08:27 -0700)
commitd125a7eba6bfcc5ca378ddffa37fa4805bf803df
treeb672f2dcf63d73091f7dc02e4dc0c1a566a9c4e7
parentc07ad5e868d1ecd82f2b75ef83eec3b904259002
can: mscan-mpc5xxx: fix return value check in mpc512x_can_get_clock()

commit f61bd0585dfc7d99db4936d7467de4ca8e2f7ea0 upstream.

In case of error, the function clk_get() returns ERR_PTR()
and never returns NULL pointer. The NULL test in the error
handling should be replaced with IS_ERR().

dpatch engine is used to auto generated this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/mscan/mpc5xxx_can.c