Commit 7897ab78 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown

ASoC: Intel: some incorrect sizeof() usages

The intent was to say "sizeof(*pos)" and not "sizeof(pos)".

The sizeof(*pos) is 8 bytes so the bug won't show up on 64 bit systems.
The sizeof(*dx) is 172 bytes so that will be a bugfix.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent c9eaa447
...@@ -617,7 +617,7 @@ static void hsw_notification_work(struct work_struct *work) ...@@ -617,7 +617,7 @@ static void hsw_notification_work(struct work_struct *work)
case IPC_POSITION_CHANGED: case IPC_POSITION_CHANGED:
trace_ipc_notification("DSP stream position changed for", trace_ipc_notification("DSP stream position changed for",
stream->reply.stream_hw_id); stream->reply.stream_hw_id);
sst_dsp_inbox_read(hsw->dsp, pos, sizeof(pos)); sst_dsp_inbox_read(hsw->dsp, pos, sizeof(*pos));
if (stream->notify_position) if (stream->notify_position)
stream->notify_position(stream, stream->pdata); stream->notify_position(stream, stream->pdata);
...@@ -1609,7 +1609,7 @@ int sst_hsw_dx_set_state(struct sst_hsw *hsw, ...@@ -1609,7 +1609,7 @@ int sst_hsw_dx_set_state(struct sst_hsw *hsw,
trace_ipc_request("PM enter Dx state", state); trace_ipc_request("PM enter Dx state", state);
ret = ipc_tx_message_wait(hsw, header, &state_, sizeof(state_), ret = ipc_tx_message_wait(hsw, header, &state_, sizeof(state_),
dx, sizeof(dx)); dx, sizeof(*dx));
if (ret < 0) { if (ret < 0) {
dev_err(hsw->dev, "ipc: error set dx state %d failed\n", state); dev_err(hsw->dev, "ipc: error set dx state %d failed\n", state);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment