* [PATCH] regulator: da9211: Check return value of devm_kzalloc()
@ 2014-08-17 10:34 Axel Lin
2014-08-17 13:55 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2014-08-17 10:34 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: James Ban, Support Opensource, linux-kernel@vger.kernel.org
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/da9211-regulator.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/regulator/da9211-regulator.c b/drivers/regulator/da9211-regulator.c
index ccc2e36..a26f1d2 100644
--- a/drivers/regulator/da9211-regulator.c
+++ b/drivers/regulator/da9211-regulator.c
@@ -343,6 +343,8 @@ static int da9211_i2c_probe(struct i2c_client *i2c,
unsigned int data;
chip = devm_kzalloc(&i2c->dev, sizeof(struct da9211), GFP_KERNEL);
+ if (!chip)
+ return -ENOMEM;
chip->dev = &i2c->dev;
chip->regmap = devm_regmap_init_i2c(i2c, &da9211_regmap_config);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: da9211: Check return value of devm_kzalloc()
2014-08-17 10:34 [PATCH] regulator: da9211: Check return value of devm_kzalloc() Axel Lin
@ 2014-08-17 13:55 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-08-17 13:55 UTC (permalink / raw)
To: Axel Lin
Cc: Liam Girdwood, James Ban, Support Opensource,
linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 124 bytes --]
On Sun, Aug 17, 2014 at 06:34:48PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-17 13:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-17 10:34 [PATCH] regulator: da9211: Check return value of devm_kzalloc() Axel Lin
2014-08-17 13:55 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.