[3.19.y-ckt stable] Patch "ASoC: tfa9879: Fix return value check in tfa9879_i2c_probe()" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Thu May 21 20:36:28 UTC 2015
This is a note to let you know that I have just added a patch titled
ASoC: tfa9879: Fix return value check in tfa9879_i2c_probe()
to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue
This patch is scheduled to be released in version 3.19.8-ckt1.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From 47df064894ab70d342fe26f13450fed6644dd3b8 Mon Sep 17 00:00:00 2001
From: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
Date: Thu, 16 Apr 2015 20:17:46 +0800
Subject: ASoC: tfa9879: Fix return value check in tfa9879_i2c_probe()
commit 427ced4b203dfea4f08b1298cd1f88e19039fca4 upstream.
In case of error, the function devm_kzalloc() returns NULL
not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.
Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
Acked-by: Peter Rosin <peda at axentia.se>
Signed-off-by: Mark Brown <broonie at kernel.org>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
sound/soc/codecs/tfa9879.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/tfa9879.c b/sound/soc/codecs/tfa9879.c
index 16f1b71..aab0af6 100644
--- a/sound/soc/codecs/tfa9879.c
+++ b/sound/soc/codecs/tfa9879.c
@@ -280,8 +280,8 @@ static int tfa9879_i2c_probe(struct i2c_client *i2c,
int i;
tfa9879 = devm_kzalloc(&i2c->dev, sizeof(*tfa9879), GFP_KERNEL);
- if (IS_ERR(tfa9879))
- return PTR_ERR(tfa9879);
+ if (!tfa9879)
+ return -ENOMEM;
i2c_set_clientdata(i2c, tfa9879);
--
1.9.1
More information about the kernel-team
mailing list