diff --git a/lib/report/report.c b/lib/report/report.c index 2d39cb0d7..3626769a9 100644 --- a/lib/report/report.c +++ b/lib/report/report.c @@ -695,6 +695,9 @@ static int _devsize_disp(struct dm_report *rh, struct dm_pool *mem, { uint64_t size; + if (!data) + return _field_set_value(field, "", NULL); + if (!dev_get_size(*(const struct device **) data, &size)) return_0;