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>] [day] [month] [year] [list]
Message-id: <29718349.140341335343984348.JavaMail.weblogic@epml25>
Date:	Wed, 25 Apr 2012 08:53:06 +0000 (GMT)
From:	MyungJoo Ham <myungjoo.ham@...sung.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	¹Ú°æ¹Î <kyungmin.park@...sung.com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
	ÃÖÂù¿ì <cw00.choi@...sung.com>
Subject: Re: [patch] Extcon: check for allocation failure

> Return -ENOMEM if the kmalloc() fails.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

Acked-by: MyungJoo Ham <myungjoo.ham@...sung.com>


> 
> diff --git a/drivers/extcon/extcon_class.c b/drivers/extcon/extcon_class.c
> index 3bc4b8a..fe5a038 100644
> --- a/drivers/extcon/extcon_class.c
> +++ b/drivers/extcon/extcon_class.c
> @@ -621,6 +621,8 @@ int extcon_dev_register(struct extcon_dev *edev, struct device *dev)
>  	}
>  
>  	edev->dev = kzalloc(sizeof(struct device), GFP_KERNEL);
> +	if (!edev->dev)
> +		return -ENOMEM;
>  	edev->dev->parent = dev;
>  	edev->dev->class = extcon_class;
>  	edev->dev->release = extcon_dev_release;
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ