From nobody Tue Apr 16 15:42:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1575144064; cv=none; d=zohomail.com; s=zohoarc; b=JcSylJocnwwnbGKyhWuRqK9OgX0yLK9shoUGz9jHKS6iqDMzXWsQCdQkkli2Ky1iaNfzbBI/GgwI/ntUxirgrQiKrRadl56A88RlkLl9i1ob6oqnXI6bCbNSDShP1s5HiAXncgTua+Yp+eD2diiJFmuFRX0j9Cff+TsS4imXZM8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575144064; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+6r20tme1c3K1oItK55VjhZNP4i1wewMOCLwqCimvoE=; b=c558lKC9+LNYk2NVt1/nC1mNiOhIQot5gUmMHUYitrxUBm48bIkOAO2rSwSwAjGv5SqG1dOKMhqj9U9ZHRmp/0gtWbPXnr3RFJI+jr0ThViC6c93R0DYG0Cquf8vLoozcs6gb0NbxPuTL2dKcRWgr1F0DS53hhLjM4vdFeKwIVI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1575144064891874.6006616618638; Sat, 30 Nov 2019 12:01:04 -0800 (PST) Received: from localhost ([::1]:37840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ib8vO-0002Ox-5r for importer@patchew.org; Sat, 30 Nov 2019 15:01:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53673) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ib8dx-0006ZU-DQ for qemu-devel@nongnu.org; Sat, 30 Nov 2019 14:43:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ib8dv-0005Dz-5F for qemu-devel@nongnu.org; Sat, 30 Nov 2019 14:43:01 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:49912 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ib8du-0005An-U7 for qemu-devel@nongnu.org; Sat, 30 Nov 2019 14:42:59 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-266-tflcyL6LMEmznqfwm4cVFg-1; Sat, 30 Nov 2019 14:42:51 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 66772DB21; Sat, 30 Nov 2019 19:42:50 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-134.ams2.redhat.com [10.36.116.134]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 354586608A; Sat, 30 Nov 2019 19:42:50 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 487DE1135A70; Sat, 30 Nov 2019 20:42:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575142976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+6r20tme1c3K1oItK55VjhZNP4i1wewMOCLwqCimvoE=; b=PRRBV4WR4pKNXKfHpcYILi1xHZ8qSIi9QKplOISlVIeX++2h/uAvNzntPdlXHHHvmiujLq bcE60AZ1OlvglGJ1Ys+Uq/x8dN/TJS/uiaiwEg1vu1ZZpsnMxshCKMkfXJtQljZygmOs8u SxqP+2CbhLZyD0z0+WOPEmkvCHWRNM0= From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 20/21] hw/intc/s390: Simplify error handling in kvm_s390_flic_realize() Date: Sat, 30 Nov 2019 20:42:39 +0100 Message-Id: <20191130194240.10517-21-armbru@redhat.com> In-Reply-To: <20191130194240.10517-1-armbru@redhat.com> References: <20191130194240.10517-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: tflcyL6LMEmznqfwm4cVFg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Halil Pasic , Christian Borntraeger , vsementsov@virtuozzo.com, Cornelia Huck Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Cc: Halil Pasic Cc: Cornelia Huck Cc: Christian Borntraeger Signed-off-by: Markus Armbruster Acked-by: Halil Pasic Reviewed-by: Cornelia Huck --- hw/intc/s390_flic_kvm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c index 30d50c2369..dddd33ea61 100644 --- a/hw/intc/s390_flic_kvm.c +++ b/hw/intc/s390_flic_kvm.c @@ -586,16 +586,17 @@ static void kvm_s390_flic_realize(DeviceState *dev, E= rror **errp) =20 KVM_S390_FLIC_GET_CLASS(dev)->parent_realize(dev, &err); if (err) { - goto fail; + error_propagate(errp, err); + return; } flic_state->fd =3D -1; =20 cd.type =3D KVM_DEV_TYPE_FLIC; ret =3D kvm_vm_ioctl(kvm_state, KVM_CREATE_DEVICE, &cd); if (ret < 0) { - error_setg_errno(&err, errno, "Creating the KVM device failed"); + error_setg_errno(errp, errno, "Creating the KVM device failed"); trace_flic_create_device(errno); - goto fail; + return; } flic_state->fd =3D cd.fd; =20 @@ -603,9 +604,6 @@ static void kvm_s390_flic_realize(DeviceState *dev, Err= or **errp) test_attr.group =3D KVM_DEV_FLIC_CLEAR_IO_IRQ; flic_state->clear_io_supported =3D !ioctl(flic_state->fd, KVM_HAS_DEVICE_ATTR, test_attr= ); - return; -fail: - error_propagate(errp, err); } =20 static void kvm_s390_flic_reset(DeviceState *dev) --=20 2.21.0