]> git.baikalelectronics.ru Git - kernel.git/commit
Input: cyttsp - use PTR_ERR_OR_ZERO()
authorJavier Martinez Canillas <javier@osg.samsung.com>
Fri, 2 Oct 2015 18:21:12 +0000 (11:21 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 2 Oct 2015 18:44:19 +0000 (11:44 -0700)
commit5027734e04920f852afa7199c31c3040b3a97be1
treec48b040487faf5ff535aa26937793610cdf40ade
parent05e8db6c44d744dd56a876bc8f02c501cb6a5d1e
Input: cyttsp - use PTR_ERR_OR_ZERO()

The PTR_ERR_OR_ZERO() helper function checks if a pointer contains an
errno code and returns it or return 0 if that's not the case. Use the
helper instead of open coding the same logic in the driver. This was
found with make coccicheck that complains with the following warning:

drivers/input/touchscreen/cyttsp4_i2c.c:53:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/cyttsp4_i2c.c