Message ID | 20230307134245.83599-1-bchihi@baylibre.com |
---|---|
State | New |
Headers | show |
Series | thermal/drivers/mediatek/lvts_thermal: fix memcpy's number of bytes in lvts_calibration_init() | expand |
diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index ddfdcbcf6d86..b505c6b49031 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -575,7 +575,7 @@ static int lvts_calibration_init(struct device *dev, struct lvts_ctrl *lvts_ctrl for (i = 0; i < lvts_ctrl_data->num_lvts_sensor; i++) memcpy(&lvts_ctrl->calibration[i], - efuse_calibration + lvts_ctrl_data->cal_offset[i], 2); + efuse_calibration + lvts_ctrl_data->cal_offset[i], sizeof(int)); return 0; }