From: MyungJoo Ham <myungjoo.ham@samsung.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
박경민 <kyungmin.park@samsung.com>,
"Mark Brown" <broonie@opensource.wolfsonmicro.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>, 최찬우 <cw00.choi@samsung.com>
Subject: Re: [patch] Extcon: check for allocation failure
Date: Wed, 25 Apr 2012 08:53:06 +0000 (GMT) [thread overview]
Message-ID: <29718349.140341335343984348.JavaMail.weblogic@epml25> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 822 bytes --]
> Return -ENOMEM if the kmalloc() fails.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.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;
>
>
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next reply other threads:[~2012-04-25 8:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-25 8:53 MyungJoo Ham [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-04-25 8:47 [patch] Extcon: check for allocation failure Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29718349.140341335343984348.JavaMail.weblogic@epml25 \
--to=myungjoo.ham@samsung.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=cw00.choi@samsung.com \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox