On 2/2/21 6:49 AM, Vladimir Sementsov-Ogievskiy wrote: > Set errp always on failure. Generic bdrv_open_driver supports driver > functions which can return negative value and forget to set errp. > That's a strange thing.. Let's improve bdrv_qed_do_open to not behave > this way. This allows to simplify code in > bdrv_qed_co_invalidate_cache().
Grammar tweak: Always set errp on failure. Generic bdrv_open_driver supports driver functions which can return a negative value but forget to set errp. That's a strange thing. Let's improve bdrv_qed_do_open to not behave this way. This allows the simplification of code in bdrv_qed_co_invalidate_cache(). > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > Reviewed-by: Alberto Garcia <be...@igalia.com> > Reviewed-by: Greg Kurz <gr...@kaod.org> > --- > block/qed.c | 24 +++++++++++++++--------- > 1 file changed, 15 insertions(+), 9 deletions(-) > -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org