Message ID | d85aaf2b-0db5-1ad0-f57f-1000c96e1c38@users.sourceforge.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c index 02790f69e26c..5d29aa35cc34 100644 --- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c +++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c @@ -160,10 +160,9 @@ static struct ti_thermal_data struct ti_thermal_data *data; data = devm_kzalloc(bgp->dev, sizeof(*data), GFP_KERNEL); - if (!data) { - dev_err(bgp->dev, "kzalloc fail\n"); + if (!data) return NULL; - } + data->sensor_id = id; data->bgp = bgp; data->mode = THERMAL_DEVICE_ENABLED;