Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4167336pxv; Mon, 19 Jul 2021 19:05:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAE/yfyZ6OpmgCkFWaIlvXgdpWkF84e8ImM9fR122Zpf6p5bSdQrySRuQkZjBzCbjqG13X X-Received: by 2002:a50:9554:: with SMTP id v20mr37299919eda.179.1626746700079; Mon, 19 Jul 2021 19:05:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626746700; cv=none; d=google.com; s=arc-20160816; b=u9uDqcBG4OYSYL5vIXf7OyVd1OrRwn7you25J3ocp9rjgwMtn4oUyqqDQbzfKglzxg fCWCh1h2MLwv7gcRWcKfJAf2y6V5uOWRVBfggGNQZ2x1gIISYxzbEM5b7QvA1nrxZNV3 sXvMOTfe5WmO7VhrDpld74lSodkCqPQ2QziGP2qG8ZqCpmkP8ZgROvbV74XX7MikUsji TR5wvjpoSSFi8ykJb3AhUc+LTYyCe22laZpf8cNnt1K15niNQaYdmZ63yIPBMfrZnfww KwBKYGIFpmjEOqOm8Dikmrva7WJlzVg0b+lk/4iOV1CKYlyNUFq4Kbnn0JYy4bCAdrBu F2fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=0UPC3RKso4eGmVb6NjQIjI282/Jk3DWZCmYoxhCt8UM=; b=O3K7XZc6VR3Ucum7dvi3q5siEIYyBcLNMfKp5PeeJOv7Sf+v3lNL1ySSfL7L2UlmZT C74j9eO0On14+z+c0D8OUBLUuT5RsSwfHOp/46ZoQJhXjTjOMfiFczkY3dbuPYTRilOC tlL0Dj5y5+cK+N9XXG5V+ydr7GliwADAEksgV0K/pRbsx9YuJI31d6+N4FTlEdcqy6uh /r3wzSE7yMSo1qfFHQHcJKFD4i+SF8nZVQxLry0Oq8B6RLUFCTPHCemAZdrVCKNDuf9o 2U2l1CNfwi/f0G6oEaj9WTUFOs62gMjTKAL2s15K0/WGjyk1LNxxKMgrkJVlxGpPeNub HFKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i18si3938780edc.507.2021.07.19.19.04.37; Mon, 19 Jul 2021 19:05:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383135AbhGSRw6 (ORCPT + 99 others); Mon, 19 Jul 2021 13:52:58 -0400 Received: from mga01.intel.com ([192.55.52.88]:33819 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241114AbhGSRn5 (ORCPT ); Mon, 19 Jul 2021 13:43:57 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10050"; a="232883861" X-IronPort-AV: E=Sophos;i="5.84,252,1620716400"; d="scan'208";a="232883861" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2021 11:24:34 -0700 X-IronPort-AV: E=Sophos;i="5.84,252,1620716400"; d="scan'208";a="414430041" Received: from rraymond-mobl1.amr.corp.intel.com (HELO [10.209.130.70]) ([10.209.130.70]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2021 11:24:33 -0700 Subject: Re: [PATCH V3 05/12] ASoC: amd: add ACP5x PCM platform driver To: Vijendar Mukunda , broonie@kernel.org, alsa-devel@alsa-project.org Cc: Sunil-kumar.Dommati@amd.com, open list , Takashi Iwai , Liam Girdwood , Alexander.Deucher@amd.com, krisman@collabora.com References: <20210719165140.16143-1-vijendar.mukunda@amd.com> <20210719165140.16143-6-vijendar.mukunda@amd.com> From: Pierre-Louis Bossart Message-ID: Date: Mon, 19 Jul 2021 13:09:12 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210719165140.16143-6-vijendar.mukunda@amd.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +static int acp5x_audio_probe(struct platform_device *pdev) > +{ > + struct resource *res; > + struct i2s_dev_data *adata; > + int status; > + > + if (!pdev->dev.platform_data) { > + dev_err(&pdev->dev, "platform_data not retrieved\n"); > + return -ENODEV; > + } > + irqflags = *((unsigned int *)(pdev->dev.platform_data)); > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + if (!res) { > + dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n"); > + return -ENODEV; > + } > + > + adata = devm_kzalloc(&pdev->dev, sizeof(*adata), GFP_KERNEL); > + if (!adata) > + return -ENOMEM; > + > + adata->acp5x_base = devm_ioremap(&pdev->dev, res->start, > + resource_size(res)); > + if (!adata->acp5x_base) > + return -ENOMEM; > + dev_set_drvdata(&pdev->dev, adata); > + status = devm_snd_soc_register_component(&pdev->dev, > + &acp5x_i2s_component, > + NULL, 0); > + if (status) { > + dev_err(&pdev->dev, "Fail to register acp i2s component\n"); > + return -ENODEV; Unclear why you need to change the error code explicitly to -ENODEV? return status? > + } > + return 0; > +} > +