Received: from eggs.gnu.org ([2001:4830:134:3::10]:44405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFIZy-0007MJ-8d for qemu-devel@nongnu.org; Wed, 15 Jul 2015 05:02:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFIZv-0008WK-3Z for qemu-devel@nongnu.org; Wed, 15 Jul 2015 05:02:14 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:38195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFIZu-0008Nx-R6 for qemu-devel@nongnu.org; Wed, 15 Jul 2015 05:02:11 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 15 Jul 2015 10:01:58 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 0203B219004D for ; Wed, 15 Jul 2015 10:01:35 +0100 (BST) Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t6F91vGF36307192 for ; Wed, 15 Jul 2015 09:01:57 GMT Received: from d06av07.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t6F91vZj020125 for ; Wed, 15 Jul 2015 05:01:57 -0400 Date: Wed, 15 Jul 2015 11:01:55 +0200 From: Cornelia Huck Message-ID: <20150715110155.442078b5.cornelia.huck@de.ibm.com> In-Reply-To: <1436938201-16766-2-git-send-email-jasowang@redhat.com> References: <1436938201-16766-1-git-send-email-jasowang@redhat.com> <1436938201-16766-2-git-send-email-jasowang@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V2 1/5] virtio: get_features() can fail List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, mst@redhat.com On Wed, 15 Jul 2015 13:29:57 +0800 Jason Wang wrote: > Signed-off-by: Jason Wang > --- > hw/9pfs/virtio-9p-device.c | 3 ++- > hw/block/virtio-blk.c | 3 ++- > hw/char/virtio-serial-bus.c | 3 ++- > hw/display/virtio-gpu.c | 3 ++- > hw/input/virtio-input.c | 3 ++- > hw/net/virtio-net.c | 3 ++- > hw/scsi/vhost-scsi.c | 3 ++- > hw/scsi/virtio-scsi.c | 3 ++- > hw/virtio/virtio-balloon.c | 3 ++- > hw/virtio/virtio-bus.c | 3 ++- > hw/virtio/virtio-rng.c | 2 +- > include/hw/virtio/virtio.h | 4 +++- > 12 files changed, 24 insertions(+), 12 deletions(-) > diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c > index 3926f7e..febda76 100644 > --- a/hw/virtio/virtio-bus.c > +++ b/hw/virtio/virtio-bus.c > @@ -54,7 +54,8 @@ void virtio_bus_device_plugged(VirtIODevice *vdev, Error **errp) > > /* Get the features of the plugged device. */ > assert(vdc->get_features != NULL); > - vdev->host_features = vdc->get_features(vdev, vdev->host_features); > + vdev->host_features = vdc->get_features(vdev, vdev->host_features, > + errp); > } > > /* Reset the virtio_bus */ Don't you need to propagate the error instead of passing it through? Or am I just confused by error handling? :)