thermal: rcar_gen3_thermal: check that TSC exists before memory allocation
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Wed, 29 Mar 2017 18:43:52 +0000 (20:43 +0200)
committerEduardo Valentin <edubezval@gmail.com>
Fri, 31 Mar 2017 04:41:48 +0000 (21:41 -0700)
commitd51546c0db975a4750161d17eef62dfcf9eedc90
tree86f6a3a865e2851724e78285249567ff7934e194
parent100cfbcf2580b0605f50af32fefd9c8d1d8357fb
thermal: rcar_gen3_thermal: check that TSC exists before memory allocation

Move the check for a TSC resource before allocating memory for a new
TSC. If no TSC is found there is little point in allocating memory for
it.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/rcar_gen3_thermal.c