mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-31 03:15:42 +00:00
dm: Coding style fix: Handle failure of parsing /proc/iomem
In get_mmio_hpa_resource, although very unlikely, parsing of /proc/iomem may fail. Handle the case of failure and exit early. Tracked-On: #7593 Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
This commit is contained in:
parent
b5d3f93e56
commit
6bbbddd974
@ -137,6 +137,9 @@ int get_mmio_hpa_resource(char *name, uint64_t *res_start, uint64_t *res_size)
|
||||
pr_err("Please run acrn-dm with superuser privilege\n");
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
pr_err("Parsing /proc/iomem failed\n");
|
||||
break;
|
||||
}
|
||||
|
||||
*res_start = start;
|
||||
|
Loading…
Reference in New Issue
Block a user