From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ba1sC-0007jD-C9 for qemu-devel@nongnu.org; Wed, 17 Aug 2016 10:31:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ba1s7-000704-3F for qemu-devel@nongnu.org; Wed, 17 Aug 2016 10:31:15 -0400 Received: from [59.151.112.132] (port=26192 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ba1s6-0006x9-Eg for qemu-devel@nongnu.org; Wed, 17 Aug 2016 10:31:11 -0400 From: Cao jin Date: Wed, 17 Aug 2016 22:39:07 +0800 Message-ID: <1471444747-6277-7-git-send-email-caoj.fnst@cn.fujitsu.com> In-Reply-To: <1471444747-6277-1-git-send-email-caoj.fnst@cn.fujitsu.com> References: <1471444747-6277-1-git-send-email-caoj.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH 6/6] 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 bde408d..6f73217 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