Message ID | 20240328170323.14279-1-rodrigo.vivi@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <intel-gfx-bounces@lists.freedesktop.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6EB47CD11DD for <intel-gfx@archiver.kernel.org>; Thu, 28 Mar 2024 17:03:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B09DA10E40A; Thu, 28 Mar 2024 17:03:35 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="cE2iKQTI"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id A472A10E34D; Thu, 28 Mar 2024 17:03:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711645414; x=1743181414; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=meq0wgoKhQVGzwSdvo7cTvsfOg2Kie5Odv3FwAFt43s=; b=cE2iKQTIIEaVgyhUO+jVZQpgi/0Mrhjh8sTYV3r2xJFGsTf27UGbVRoj UPchwnXIj7BJK89O0fLOPd1QHQYG0uiJVZPHGypGUQJk2fM2C2Hra2Ecz sHVBzQr3bnjp9gjVlCmeGxkKUebSGrN2+4NA/dXZfxd628JhjExniJqts h+Y2kfFQ4h4QkQRs264yRL4TD8oQeJ8oo8pBwoOo5MVWtZAlATkxAxzrC v0lLD+3KfcIhhPlSYDZDEhIecGMmVguPyLxvKs1bIB3vfrqIj1HP+XQTi vCsExSS7jc7Xx1cxZjAkdIks9DkvzLNtU23GJEvXgp9Nb4YjfboaT43+w g==; X-CSE-ConnectionGUID: UpwRb90HTSagLscyQU9Xig== X-CSE-MsgGUID: Em7FiIouSUSvz8lUc8Z+Kg== X-IronPort-AV: E=McAfee;i="6600,9927,11027"; a="18253026" X-IronPort-AV: E=Sophos;i="6.07,162,1708416000"; d="scan'208";a="18253026" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2024 10:03:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,162,1708416000"; d="scan'208";a="17346549" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa008.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 28 Mar 2024 10:03:32 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 28 Mar 2024 10:03:32 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 28 Mar 2024 10:03:31 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Thu, 28 Mar 2024 10:03:31 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 28 Mar 2024 10:03:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hZYYxtaX95G18SZQM6dCiHb+xl8v49ScOyT5NRh8X3934ijc2nLwu7RrUQU0PHLXJT9cQhcTPcktr04jYONZhX78LPqT7c2l1LLEC9wLFt5HWlq/kbt5OBXFAiiYoOuu5NOvTb5VgAW5ciFClxZmaxPLL0LS3sjlBTPhxaWPoGOSZXFH99jUVXeOXIcUoNvK+otj+LgubYNDNQARBTtl4UvFjiCE5KbW1Y9ZFLMVG2m3kRxAWSHvRhPHlpAP2SiULUIHRLHiWi4kNNP/4ncAataUraosoZAJLvWgPozSEiWEBSl0m/Snk6X07Fen4TpzqVg15eQNqOZuRdQBERmBPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9KyFfISJs5KdSfL7J5bVER9gRshyWtG/fsUP9phcvcQ=; b=mwyIwB6xkfCSKTox0WN6h7d7La0UaM94zG2dLcriQi9/wjiIqf++lwn3JU+8T9i7ebUIHYcEu+7E7PzVM/MnDmogJqyFklVKNgipqdaQ209B5raZf8ZLHL9v0GUyW2eyDlfsAaeg6X+yPR61479a2RyDAAn5RHrtLaYncBnKv/N+rmA/neA5ZW2cNfa4H6d9JbXEWhTs+SzjupTJz2O38M0nT5rcJgPN7pTAqaDQ6bGa/CbLfqkT9taUvkazgaalF/lJZwA/UhmYnB1Dqs8JrWIMczaoDPQBFQP4GGJji+aefqEjTtc0Ms727hvWaSywwcEWKJV4tNhgimuKfqEmmg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MN0PR11MB6059.namprd11.prod.outlook.com (2603:10b6:208:377::9) by DS7PR11MB7690.namprd11.prod.outlook.com (2603:10b6:8:e6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.32; Thu, 28 Mar 2024 17:03:28 +0000 Received: from MN0PR11MB6059.namprd11.prod.outlook.com ([fe80::7607:bd60:9638:7189]) by MN0PR11MB6059.namprd11.prod.outlook.com ([fe80::7607:bd60:9638:7189%4]) with mapi id 15.20.7409.031; Thu, 28 Mar 2024 17:03:28 +0000 From: Rodrigo Vivi <rodrigo.vivi@intel.com> To: <intel-gfx@lists.freedesktop.org> CC: <intel-xe@lists.freedesktop.org>, Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>, Rodrigo Vivi <rodrigo.vivi@intel.com> Subject: [PATCH] ASoC: SOF: Core: Add remove_late() to sof_init_environment failure path Date: Thu, 28 Mar 2024 13:03:23 -0400 Message-ID: <20240328170323.14279-1-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240328135233.1204694-1-rodrigo.vivi@intel.com> References: <20240328135233.1204694-1-rodrigo.vivi@intel.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR21CA0012.namprd21.prod.outlook.com (2603:10b6:a03:114::22) To MN0PR11MB6059.namprd11.prod.outlook.com (2603:10b6:208:377::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN0PR11MB6059:EE_|DS7PR11MB7690:EE_ X-MS-Office365-Filtering-Correlation-Id: c7afe385-e16d-4774-11a0-08dc4f48fd2a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JfMMDf0tK6aDm3gTMQP0rv8qGvynaW/DYYGQRpexLflwu4MseTgmX41AIvZGXbg8/yNNqaR/dGbi989p91x2/eAxuzntlewbHQ5tqNIbFo+2jajE2L1J8x6UEla/qJD0N8gqH+xkwDPAsMc27z7kIj1yChNztjTC1v+upVMLs05h8M5RPKbPbJtdJCM89KaoIDTG8CzgACWKeD2Wa5kbbFAlgD2u2cf/dDYksZmosJEniqT8W+Nu1wQyqWuBHamHJ4MQqpdtQlhMWy1J5UrmwAy3blJbKWH1Kkj24B15jblnCOHRp1F/eMADWYcuNjWrGvXu/g1+IGd3uTTBC7xjqC3ckWxAE0DqrYArH2eF8d0C+pefEGZg8kk98cAZy3efQf7VLh1mMG1BfviFQFLAPBtt7QO94jHwo8rtsJbGUuboieT+yTP9gVaoaHAQLQDLNzo1ftGtotTshMpFovMbeE0R65601xf8xVG/64uFpvw0cej5DsrSc77NpONWL1E10k2+wiEMfvuOMJ8Rdf7hvgznydW6CkK0bAXI463+xXufviSFP9qFg1iZInf3Y4M7eAJVbs5OMdx48uO73S45NnhIvsaxmTQDuQgyHWQ1h2umcMYd5ahPAbm8WMWUcsu7 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN0PR11MB6059.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800799015)(366007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: E6It33Sq/6vpm891AE2LRzw0S0I7SZLvlBypK4RTybse2MlNKJr+6P/oGWxzJAIcwX4w4loBtpNxWUZosEwHzw7wBm0nWlFQZSwNu0ncnyWt8uo+juYTLefAMCJ25a0DHJ+2sX4CL7RGhueaxn5Fz4Iq1cE/1ZEytX5yrycHaEWQQAnEsbS/U3cS8p1w/aJQ974iCcpfhUS/D7mJDW/NXoah+rtE8yuZnp6pYfpEITJc8PnNXnPFlvIu2aTCW/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EpbqNLy6j+9DLc8MbKdlxb8fL3oVXgkEBAZlvOcAjy4P5mEkAauFoFDOoYXrNY3+8A/boUaqPvYMDHwk7TcoGlNdnw+C/MdGh7rJrTAxrYW8XHPkF05/Oh1T5b2JUSGO6uiN0dlKVUFcMO5YoHYdSfx2XwuRSXiH7uDByAJB+vu756rs1R2lYzop5mqlzNICticfhLgS4pajAFEEqZxPwmgYT2tQaWYH1HP3111ThG7wSgJhA5khlpzwVr5G9d8yALZKNt67FoeCD18kKwzo9A9wUw== X-MS-Exchange-CrossTenant-Network-Message-Id: c7afe385-e16d-4774-11a0-08dc4f48fd2a X-MS-Exchange-CrossTenant-AuthSource: MN0PR11MB6059.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Mar 2024 17:03:28.7223 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Wi2FvD9fokPdEDzOmnqBpYxffgxfCFM4UCoc45E+mx7odVeDzuZPpAnQsV8hBB4f+sLjE1k2eFbqb8b6WTKaxQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB7690 X-OriginatorOrg: intel.com X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development <intel-gfx.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/intel-gfx>, <mailto:intel-gfx-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/intel-gfx> List-Post: <mailto:intel-gfx@lists.freedesktop.org> List-Help: <mailto:intel-gfx-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/intel-gfx>, <mailto:intel-gfx-request@lists.freedesktop.org?subject=subscribe> Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" <intel-gfx-bounces@lists.freedesktop.org> |
Series |
ASoC: SOF: Core: Add remove_late() to sof_init_environment failure path
|
expand
|
diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c index 425b023b03b4..3e41821562f0 100644 --- a/sound/soc/sof/core.c +++ b/sound/soc/sof/core.c @@ -339,8 +339,7 @@ static int sof_init_environment(struct snd_sof_dev *sdev) ret = snd_sof_probe(sdev); if (ret < 0) { dev_err(sdev->dev, "failed to probe DSP %d\n", ret); - sof_ops_free(sdev); - return ret; + goto err_sof_probe; } /* check machine info */ @@ -358,15 +357,18 @@ static int sof_init_environment(struct snd_sof_dev *sdev) ret = validate_sof_ops(sdev); if (ret < 0) { snd_sof_remove(sdev); + snd_sof_remove_late(sdev); return ret; } } + return 0; + err_machine_check: - if (ret) { - snd_sof_remove(sdev); - sof_ops_free(sdev); - } + snd_sof_remove(sdev); +err_sof_probe: + snd_sof_remove_late(sdev); + sof_ops_free(sdev); return ret; }