From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bc7ra-0000Z2-E0 for qemu-devel@nongnu.org; Tue, 23 Aug 2016 05:19:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bc7rY-00078X-IM for qemu-devel@nongnu.org; Tue, 23 Aug 2016 05:19:17 -0400 Received: from [59.151.112.132] (port=11216 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bc7rX-000777-MG for qemu-devel@nongnu.org; Tue, 23 Aug 2016 05:19:16 -0400 From: Cao jin Date: Tue, 23 Aug 2016 17:27:34 +0800 Message-ID: <1471944454-13895-6-git-send-email-caoj.fnst@cn.fujitsu.com> In-Reply-To: <1471944454-13895-1-git-send-email-caoj.fnst@cn.fujitsu.com> References: <1471944454-13895-1-git-send-email-caoj.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v2 5/5] megasas: undo the overwrites of user configuration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Hannes Reinecke , Paolo Bonzini , Markus Armbruster , Marcel Apfelbaum , "Michael S. Tsirkin" Commit afea4e14 seems forgetting to undo the overwrites, which is unsuitable. CC: Hannes Reinecke CC: Paolo Bonzini CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Signed-off-by: Cao jin --- hw/scsi/megasas.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 90cd873..ff314a2 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -2333,11 +2333,10 @@ static void megasas_scsi_realize(PCIDevice *dev, Error **errp) "msi=off with this machine type.\n"); error_propagate(errp, err); return; - } else if (ret) { - /* With msi=auto, we fall back to MSI off silently */ - s->msi = ON_OFF_AUTO_OFF; - error_free(err); } + assert(!err || s->msix == ON_OFF_AUTO_AUTO); + /* With msi=auto, we fall back to MSI off silently */ + error_free(err); } memory_region_init_io(&s->mmio_io, OBJECT(s), &megasas_mmio_ops, s, -- 2.1.0