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] [day] [month] [year] [list]
Message-ID: <20100618213250.GG3582@sortiz.org>
Date:	Fri, 18 Jun 2010 23:32:51 +0200
From:	Samuel Ortiz <sameo@...ux.intel.com>
To:	Axel Lin <axel.lin@...il.com>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Ian Molton <spyro@....com>,
	Dmitry Baryshkov <dbaryshkov@...il.com>
Subject: Re: [PATCH] mfd-core: properly handle
 platform_device_add_resources fail in mfd_add_device

On Mon, May 31, 2010 at 05:30:55PM +0800, Axel Lin wrote:
> platform_device_add_resources may fail, thus add error checking for it.
Thanks Axel, patch applied.

Cheers,
Samuel.

 
> Signed-off-by: Axel Lin <axel.lin@...il.com>
> ---
>  drivers/mfd/mfd-core.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
> index 7dd76bc..1823a57 100644
> --- a/drivers/mfd/mfd-core.c
> +++ b/drivers/mfd/mfd-core.c
> @@ -70,7 +70,9 @@ static int mfd_add_device(struct device *parent, int id,
>  			goto fail_res;
>  	}
>  
> -	platform_device_add_resources(pdev, res, cell->num_resources);
> +	ret = platform_device_add_resources(pdev, res, cell->num_resources);
> +	if (ret)
> +		goto fail_res;
>  
>  	ret = platform_device_add(pdev);
>  	if (ret)
> -- 
> 1.5.4.3
> 
> 
> 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ