]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: ti-soc-thermal: clean up the error handling a bit
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 2 Mar 2016 10:00:55 +0000 (13:00 +0300)
committerEduardo Valentin <edubezval@gmail.com>
Tue, 8 Mar 2016 19:57:37 +0000 (11:57 -0800)
commit7dfd0e1eda5fcf7e05b65a70408561bb04c27e16
tree9d68d727a49dc7225af6013d925fa8c1400c1767
parentbbacf33419624a305693ae498a1afb9d978d83be
thermal: ti-soc-thermal: clean up the error handling a bit

We don't need to initialize "ret".  We can move the IS_ERR() checks into
the if condition instead of doing an assignment first.  Also there is a
check for "ret" when we know it is zero so we can remove that.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/ti-soc-thermal/ti-bandgap.c