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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <232e1bafc05611355fdd26e2ffa16d0050ad37fc.camel@analog.com>
Date:   Mon, 9 Dec 2019 09:28:37 +0000
From:   "Ardelean, Alexandru" <alexandru.Ardelean@...log.com>
To:     "hslester96@...il.com" <hslester96@...il.com>
CC:     "dan.j.williams@...el.com" <dan.j.williams@...el.com>,
        "vkoul@...nel.org" <vkoul@...nel.org>,
        "dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
        "lars@...afoo.de" <lars@...afoo.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] dmaengine: axi-dmac: add a check for
 devm_regmap_init_mmio

On Mon, 2019-12-09 at 16:57 +0800, Chuhong Yuan wrote:
> [External]
> 
> The driver misses checking the result of devm_regmap_init_mmio().
> Add a check to fix it.

Thanks :)

Reviewed-by: Alexandru Ardelean <alexandru.ardelean@...log.com>

> 
> Fixes: fc15be39a827 ("dmaengine: axi-dmac: add regmap support")
> Signed-off-by: Chuhong Yuan <hslester96@...il.com>
> ---
>  drivers/dma/dma-axi-dmac.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c
> index a0ee404b736e..cf4f892562cc 100644
> --- a/drivers/dma/dma-axi-dmac.c
> +++ b/drivers/dma/dma-axi-dmac.c
> @@ -830,6 +830,7 @@ static int axi_dmac_probe(struct platform_device
> *pdev)
>  	struct dma_device *dma_dev;
>  	struct axi_dmac *dmac;
>  	struct resource *res;
> +	struct regmap *regmap;
>  	int ret;
>  
>  	dmac = devm_kzalloc(&pdev->dev, sizeof(*dmac), GFP_KERNEL);
> @@ -921,10 +922,17 @@ static int axi_dmac_probe(struct platform_device
> *pdev)
>  
>  	platform_set_drvdata(pdev, dmac);
>  
> -	devm_regmap_init_mmio(&pdev->dev, dmac->base,
> &axi_dmac_regmap_config);
> +	regmap = devm_regmap_init_mmio(&pdev->dev, dmac->base,
> +		 &axi_dmac_regmap_config);
> +	if (IS_ERR(regmap)) {
> +		ret = PTR_ERR(regmap);
> +		goto err_free_irq;
> +	}
>  
>  	return 0;
>  
> +err_free_irq:
> +	free_irq(dmac->irq, dmac);
>  err_unregister_of:
>  	of_dma_controller_free(pdev->dev.of_node);
>  err_unregister_device:

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ