Re: [PATCH] sound: codecs: fix a potential NULL pointer dereference

2019-03-25 Thread Mukesh Ojha
Hi Kangjje/Aditya, Please do take care of the return value you are sending upstream whether still is checked or not otherwise NULL pointer dereference will still come. Also resource release properly otherwise your patch may looks simple but it can introduce memory leak as well in other path.

Re: [PATCH] sound: codecs: fix a potential NULL pointer dereference

2019-03-25 Thread Mukesh Ojha
On 3/25/2019 4:42 AM, Kangjie Lu wrote: In case devm_kzalloc fails, the patch returns -ENOMEM to avoid potential NULL pointer dereference. Signed-off-by: Kangjie Lu --- sound/soc/codecs/rt5663.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/rt5663.c

[PATCH] sound: codecs: fix a potential NULL pointer dereference

2019-03-24 Thread Kangjie Lu
In case devm_kzalloc fails, the patch returns -ENOMEM to avoid potential NULL pointer dereference. Signed-off-by: Kangjie Lu --- sound/soc/codecs/rt5663.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/rt5663.c b/sound/soc/codecs/rt5663.c index da6647015708..909ab99a1995