diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2014-11-30 23:45:42 -0500 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2014-12-08 22:31:18 -0500 |
commit | 931b9c86d9a518b1374157f103168fb787e6560e (patch) | |
tree | 740e7e379af1582bd28d4e6bd64ced44af14e420 | |
parent | 19ecaea26862228a6165232eed0861702700fb20 (diff) |
thermal: int3403: Delete a check before thermal_zone_device_unregister()
The thermal_zone_device_unregister() function tests whether its argument
is NULL and then returns immediately. Thus the test around the call
is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-rw-r--r-- | drivers/thermal/int340x_thermal/int3403_thermal.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/thermal/int340x_thermal/int3403_thermal.c b/drivers/thermal/int340x_thermal/int3403_thermal.c index 6e9fb62eb817..790b8f6da731 100644 --- a/drivers/thermal/int340x_thermal/int3403_thermal.c +++ b/drivers/thermal/int340x_thermal/int3403_thermal.c | |||
@@ -293,8 +293,7 @@ static int int3403_sensor_add(struct int3403_priv *priv) | |||
293 | return 0; | 293 | return 0; |
294 | 294 | ||
295 | err_free_obj: | 295 | err_free_obj: |
296 | if (obj->tzone) | 296 | thermal_zone_device_unregister(obj->tzone); |
297 | thermal_zone_device_unregister(obj->tzone); | ||
298 | return result; | 297 | return result; |
299 | } | 298 | } |
300 | 299 | ||