Przeglądaj źródła

Thermal:Remove usless if(!result) before return tz

result is always zero when comes here.

Signed-off-by: Yao Dongdong <yaodongdong@huawei.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Yao Dongdong 10 lat temu
rodzic
commit
1401586056
1 zmienionych plików z 1 dodań i 2 usunięć
  1. 1 2
      drivers/thermal/thermal_core.c

+ 1 - 2
drivers/thermal/thermal_core.c

@@ -1575,8 +1575,7 @@ struct thermal_zone_device *thermal_zone_device_register(const char *type,
 
 	thermal_zone_device_update(tz);
 
-	if (!result)
-		return tz;
+	return tz;
 
 unregister:
 	release_idr(&thermal_tz_idr, &thermal_idr_lock, tz->id);