Commit 54566848 authored by Hans Verkuil's avatar Hans Verkuil

staging: media: atomisp: improve unwinding

This fixes two smatch warnings:

drivers/staging/media/atomisp/pci/atomisp_cmd.c:2779 atomisp_cp_dvs_6axis_config() warn: missing unwind goto?
drivers/staging/media/atomisp/pci/atomisp_cmd.c:2878 atomisp_cp_morph_table() warn: missing unwind goto?
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
CC: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
parent f06acbe3
...@@ -2771,12 +2771,16 @@ int atomisp_cp_dvs_6axis_config(struct atomisp_sub_device *asd, ...@@ -2771,12 +2771,16 @@ int atomisp_cp_dvs_6axis_config(struct atomisp_sub_device *asd,
css_param->dvs_6axis = NULL; css_param->dvs_6axis = NULL;
dvs_6axis_config = ia_css_dvs2_6axis_config_allocate(stream); dvs_6axis_config = ia_css_dvs2_6axis_config_allocate(stream);
if (!dvs_6axis_config) if (!dvs_6axis_config) {
return -ENOMEM; ret = -ENOMEM;
goto error;
}
} else if (!dvs_6axis_config) { } else if (!dvs_6axis_config) {
dvs_6axis_config = ia_css_dvs2_6axis_config_allocate(stream); dvs_6axis_config = ia_css_dvs2_6axis_config_allocate(stream);
if (!dvs_6axis_config) if (!dvs_6axis_config) {
return -ENOMEM; ret = -ENOMEM;
goto error;
}
} }
dvs_6axis_config->exp_id = source_6axis_config->exp_id; dvs_6axis_config->exp_id = source_6axis_config->exp_id;
...@@ -2874,8 +2878,10 @@ int atomisp_cp_morph_table(struct atomisp_sub_device *asd, ...@@ -2874,8 +2878,10 @@ int atomisp_cp_morph_table(struct atomisp_sub_device *asd,
morph_table = atomisp_css_morph_table_allocate( morph_table = atomisp_css_morph_table_allocate(
source_morph_table->width, source_morph_table->width,
source_morph_table->height); source_morph_table->height);
if (!morph_table) if (!morph_table) {
return -ENOMEM; ret = -ENOMEM;
goto error;
}
for (i = 0; i < IA_CSS_MORPH_TABLE_NUM_PLANES; i++) { for (i = 0; i < IA_CSS_MORPH_TABLE_NUM_PLANES; i++) {
if (copy_from_compatible(morph_table->coordinates_x[i], if (copy_from_compatible(morph_table->coordinates_x[i],
......
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