This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media_tree.git tree:

Subject: edac_mc: check for allocation failure in edac_mc_alloc()
Author:  Dan Carpenter <[email protected]>
Date:    Fri May 18 15:51:02 2012 +0300

Add a check here for if kzalloc() failed.

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/edac/edac_mc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=08a4a136909602eae0e71e147153461df077a46f

diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 98c759d..91ca410 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -355,6 +355,8 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
                }
 
                dimm = kzalloc(sizeof(**mci->dimms), GFP_KERNEL);
+               if (!dimm)
+                       goto error;
                mci->dimms[off] = dimm;
                dimm->mci = mci;
 

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to