lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7f4ccc51-7bdd-d1c6-605a-0b432485de73@linux.intel.com>
Date:   Fri, 22 Nov 2019 09:33:52 -0600
From:   Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To:     Ravulapati Vishnu vardhan rao 
        <Vishnuvardhanrao.Ravulapati@....com>
Cc:     Alexander.Deucher@....com, djkurtz@...gle.com,
        Akshu.Agrawal@....com, Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        Vijendar Mukunda <Vijendar.Mukunda@....com>,
        YueHaibing <yuehaibing@...wei.com>,
        Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
        Dan Carpenter <dan.carpenter@...cle.com>,
        open list <linux-kernel@...r.kernel.org>,
        "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." 
        <alsa-devel@...a-project.org>
Subject: Re: [alsa-devel] [PATCH v12 2/6] ASoC: amd: Refactoring of DAI from
 DMA driver


>   static int acp3x_audio_probe(struct platform_device *pdev)
>   {
> -	int status;
>   	struct resource *res;
>   	struct i2s_dev_data *adata;
>   	unsigned int irqflags;
> +	int status, ret;
>   
>   	if (!pdev->dev.platform_data) {
>   		dev_err(&pdev->dev, "platform_data not retrieved\n");
> @@ -622,7 +426,7 @@ static int acp3x_audio_probe(struct platform_device *pdev)
>   
>   	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>   	if (!res) {
> -		dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
> +		dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
>   		return -ENODEV;
>   	}
>   
> @@ -632,60 +436,64 @@ static int acp3x_audio_probe(struct platform_device *pdev)
>   
>   	adata->acp3x_base = devm_ioremap(&pdev->dev, res->start,
>   					 resource_size(res));
> +	if (!adata->acp3x_base)
> +		return -ENOMEM;
>   
>   	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>   	if (!res) {
>   		dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n");
> -		return -ENODEV;
> +		return -ENOMEM;

it's odd for a -ENOMEM code to returned for IRQs?

>   	}
>   
>   	adata->i2s_irq = res->start;
> -	adata->play_stream = NULL;
> -	adata->capture_stream = NULL;
>   
>   	dev_set_drvdata(&pdev->dev, adata);
>   	/* Initialize ACP */
>   	status = acp3x_init(adata->acp3x_base);
>   	if (status)
>   		return -ENODEV;
> +
>   	status = devm_snd_soc_register_component(&pdev->dev,
>   						 &acp3x_i2s_component,
> -						 &acp3x_i2s_dai_driver, 1);
> +						 NULL, 0);
>   	if (status) {
> -		dev_err(&pdev->dev, "Fail to register acp i2s dai\n");
> +		dev_err(&pdev->dev, "Fail to register acp i2s component\n");
> +		ret = -ENODEV;
>   		goto dev_err;
>   	}
>   	status = devm_request_irq(&pdev->dev, adata->i2s_irq, i2s_irq_handler,
>   				  irqflags, "ACP3x_I2S_IRQ", adata);
>   	if (status) {
>   		dev_err(&pdev->dev, "ACP3x I2S IRQ request failed\n");
> +		ret = -ENODEV;
>   		goto dev_err;
>   	}
>   
> -	pm_runtime_set_autosuspend_delay(&pdev->dev, 10000);
> +	pm_runtime_set_autosuspend_delay(&pdev->dev, 5000);
>   	pm_runtime_use_autosuspend(&pdev->dev);
>   	pm_runtime_enable(&pdev->dev);
>   	return 0;
> +
>   dev_err:
>   	status = acp3x_deinit(adata->acp3x_base);
>   	if (status)
>   		dev_err(&pdev->dev, "ACP de-init failed\n");
>   	else
> -		dev_info(&pdev->dev, "ACP de-initialized\n");
> -	/*ignore device status and return driver probe error*/
> -	return -ENODEV;
> +		dev_dbg(&pdev->dev, "ACP de-initialized\n");
> +	return ret;
>   }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ