From nobody Tue Nov 18 05:50:16 2025 Delivered-To: importer@patchew.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=1608019980; cv=none; d=zohomail.com; s=zohoarc; b=IJS9EtmS3GSTK9iTiQUXtA6Jb/cPt3ZEbNZy3SJz5mhvrwywrashjD2dCN3bsWSEqNL15KEyYMUI1cFa7lBn8F5uhn3o1KBz1LL6q8J0f49xww/HvtCEZTWFMGu6/1QYGLcEwl/TWHO67vqXdgpDC0P7ESCFdnEHkmt2re1X3uQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608019980; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=FO1pFTDJZZUM7IN4j5Gc9n9+4n9xWN86FKVZ6kDk6Yw=; b=NQrKbRYOCV1GSEssYD9lE33tZGXKeWdpGUR3FJIj5+0HlVgjIksfmJj0amT5sKhr+P2vcyHDv3jDuwSK7CTsTzjQ5aZWag+/BP11W1yV/12rVVESRM9n+Vb6SnrL38pyegN+BW179xa4vlbEdUNMNNGiokJxag2oenfXjyEF4uQ= 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 16080199804482.3560867984957667; Tue, 15 Dec 2020 00:13:00 -0800 (PST) Received: from localhost ([::1]:51380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kp5S7-0006cm-Ae for importer@patchew.org; Tue, 15 Dec 2020 03:12:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kp5RI-0006Dq-Kf for qemu-devel@nongnu.org; Tue, 15 Dec 2020 03:12:08 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:22038) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kp5RG-0001df-Dd for qemu-devel@nongnu.org; Tue, 15 Dec 2020 03:12:08 -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-166-sz-vQfmxOvCs-E2OkU8BAA-1; Tue, 15 Dec 2020 03:11:57 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EA5A2801817; Tue, 15 Dec 2020 08:11:55 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-94.ams2.redhat.com [10.36.112.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 94894E70A; Tue, 15 Dec 2020 08:11:52 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B18A111AB8; Tue, 15 Dec 2020 09:11:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608019921; 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; bh=FO1pFTDJZZUM7IN4j5Gc9n9+4n9xWN86FKVZ6kDk6Yw=; b=Cdu0aC8GHdlH85KNLAskTnzR6AL6hp93Fjtuf6nKRJ1qvdWtq9fhEAG8qhzzXQH+2GWVud K15WsmuTfvLzhC3bKynPyVWiw3J1vU7jEJZZU0yZmj77wGQyAxA8pKFmvu9tAziIjQExea UGsMX5i7Cwfee0GIR94kKRTa5hl5eXA= X-MC-Unique: sz-vQfmxOvCs-E2OkU8BAA-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH] audio: add sanity check Date: Tue, 15 Dec 2020 09:11:51 +0100 Message-Id: <20201215081151.20095-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=63.128.21.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: dann frazier , Gerd Hoffmann 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" Check whenever we actually found the spiceaudio driver before flipping the can_be_default field. Fixes: f0c4555edfdd ("audio: remove qemu_spice_audio_init()") Buglink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D977301 Reported-by: dann frazier Signed-off-by: Gerd Hoffmann --- audio/audio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/audio/audio.c b/audio/audio.c index 46578e4a583b..973804620d7b 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -1709,7 +1709,9 @@ static AudioState *audio_init(Audiodev *dev, const ch= ar *name) * backend and this can go away. */ driver =3D audio_driver_lookup("spice"); - driver->can_be_default =3D 1; + if (driver) { + driver->can_be_default =3D 1; + } } =20 if (dev) { --=20 2.27.0