diff --git a/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_power_model_simple.c b/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_power_model_simple.c index d965033905ca..eeba4523199c 100644 --- a/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_power_model_simple.c +++ b/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_power_model_simple.c @@ -45,7 +45,7 @@ static unsigned long model_static_power(unsigned long voltage) unsigned long temp_squared, temp_cubed, temp_scaling_factor; const unsigned long voltage_cubed = (voltage * voltage * voltage) >> 10; - if (gpu_tz) { + if (!IS_ERR_OR_NULL(gpu_tz) && gpu_tz->ops->get_temp) { int ret; ret = gpu_tz->ops->get_temp(gpu_tz, &temperature);