mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 13:51:44 +00:00
media: venus: hfi_msgs: correct pointer increment
Data pointer should be incremented by size of the structure not the size of a pointer, correct the mistake. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Reviewed-by: Alexandre Courbot <acourbot@chromium.org> Tested-by: Alexandre Courbot <acourbot@chromium.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
bf7b704827
commit
ea8afbabc2
@ -60,14 +60,14 @@ static void event_seq_changed(struct venus_core *core, struct venus_inst *inst,
|
|||||||
frame_sz = (struct hfi_framesize *)data_ptr;
|
frame_sz = (struct hfi_framesize *)data_ptr;
|
||||||
event.width = frame_sz->width;
|
event.width = frame_sz->width;
|
||||||
event.height = frame_sz->height;
|
event.height = frame_sz->height;
|
||||||
data_ptr += sizeof(frame_sz);
|
data_ptr += sizeof(*frame_sz);
|
||||||
break;
|
break;
|
||||||
case HFI_PROPERTY_PARAM_PROFILE_LEVEL_CURRENT:
|
case HFI_PROPERTY_PARAM_PROFILE_LEVEL_CURRENT:
|
||||||
data_ptr += sizeof(u32);
|
data_ptr += sizeof(u32);
|
||||||
profile_level = (struct hfi_profile_level *)data_ptr;
|
profile_level = (struct hfi_profile_level *)data_ptr;
|
||||||
event.profile = profile_level->profile;
|
event.profile = profile_level->profile;
|
||||||
event.level = profile_level->level;
|
event.level = profile_level->level;
|
||||||
data_ptr += sizeof(profile_level);
|
data_ptr += sizeof(*profile_level);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user