The users of these (qemu) check for a negative value
so we are safe in regards to that. However they
also use the return value to inform the user of the
error.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
struct physdev_map_pirq map;
if ( !pirq )
- return -EINVAL;
-
+ {
+ errno = EINVAL;
+ return -1;
+ }
memset(&map, 0, sizeof(struct physdev_map_pirq));
map.domid = domid;
map.type = MAP_PIRQ_TYPE_GSI;
struct physdev_map_pirq map;
if ( !pirq )
- return -EINVAL;
-
+ {
+ errno = EINVAL;
+ return -1;
+ }
memset(&map, 0, sizeof(struct physdev_map_pirq));
map.domid = domid;
map.type = MAP_PIRQ_TYPE_MSI;