maybe you should init the args_base wdyt

This commit is contained in:
toninov 2025-07-24 23:02:10 +02:00
parent 5edfda18b0
commit 72cb56eff7
No known key found for this signature in database
3 changed files with 9 additions and 1 deletions

View file

@ -97,6 +97,10 @@ static struct sflc_ctor_args_base *sflegc_parse_ctor_args(int argc, char ** argv
err = -EINVAL;
goto bad_parse;
}
/* Base args */
err = sflc_ctor_args_base_init(&args->args_base, argc, argv);
if (err)
goto bad_parse;
/* Tot slices */
if (sscanf(argv[4], "%u", &args->tot_slices) != 1) {
DMERR("Could not decode tot_slices");

View file

@ -55,6 +55,10 @@ static struct sflc_ctor_args_base *sflite_parse_ctor_args(int argc, char ** argv
err = -EINVAL;
goto bad_parse;
}
/* Base args */
err = sflc_ctor_args_base_init(&args->args_base, argc, argv);
if (err)
goto bad_parse;
/* Tot slices */
if (sscanf(argv[4], "%u", &args->tot_slices) != 1) {
DMERR("Could not decode tot_slices");

View file

@ -54,7 +54,7 @@ struct sflc_volume_base *sflite_vol_ctr(struct sflc_device_base *sd_base,
err = dm_get_device(ti, sdev->sd_base.name,
dm_table_get_mode(ti->table), &svol->dm_dev);
if (err) {
ti->error = "Device lookup failed";
DMERR("Could not dm_get_device %s", sdev->sd_base.name);
goto bad_dm_dev;
}