summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Peiffer <pierre.peiffer@stericsson.com>2012-01-26 17:00:21 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:07:06 +0200
commit2ec47b2b13e3ad33eb5c4f744e6b1ef1d4c04fb7 (patch)
tree546880fb9bc8d70bb176a89b3039a593bb6b9d3d
parentbfb0df3aba020bd53ab1fcd8aabc890d94002600 (diff)
Ux500 CM: avoid ugly warning if kmalloc() fails
In some cases, if the CM driver fails to allocate memory through kmalloc(), it falls back into vmalloc() which has better chance to succeed for big allocations. When this happens, kmalloc() reports its failure with an ugly warning on the console. Just avoid this warning in this case. ST-Ericsson ID: 413249 ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson Linux next: N/A Change-Id: I6c8a51eb430891727854b1800cf3a649dcb4b6e9 Signed-off-by: Pierre Peiffer <pierre.peiffer@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/46815 Reviewed-by: QATOOLS
-rw-r--r--drivers/staging/nmf-cm/osal-kernel.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/nmf-cm/osal-kernel.c b/drivers/staging/nmf-cm/osal-kernel.c
index 0dc8328dfc0..c1d8640b11b 100644
--- a/drivers/staging/nmf-cm/osal-kernel.c
+++ b/drivers/staging/nmf-cm/osal-kernel.c
@@ -527,7 +527,7 @@ void* OSAL_Alloc(t_cm_size size)
if (size == 0)
return NULL;
- entry = kmalloc(size + sizeof(*entry), GFP_KERNEL);
+ entry = kmalloc(size + sizeof(*entry), GFP_KERNEL | __GFP_NOWARN);
if (entry == NULL) {
entry = vmalloc(size + sizeof(*entry));
@@ -553,7 +553,7 @@ void* OSAL_Alloc(t_cm_size size)
if (size == 0)
return NULL;
- mem = kmalloc(size, GFP_KERNEL);
+ mem = kmalloc(size, GFP_KERNEL | __GFP_NOWARN);
if (mem == NULL) {
mem = vmalloc(size);
if (mem == NULL)
@@ -576,7 +576,7 @@ void* OSAL_Alloc_Zero(t_cm_size size)
if (size == 0)
return NULL;
- entry = kzalloc(size + sizeof(*entry), GFP_KERNEL);
+ entry = kzalloc(size + sizeof(*entry), GFP_KERNEL | __GFP_NOWARN);
if (entry == NULL) {
entry = vmalloc(size + sizeof(*entry));
if (entry == NULL) {
@@ -603,7 +603,7 @@ void* OSAL_Alloc_Zero(t_cm_size size)
if (size == 0)
return NULL;
- mem = kzalloc(size, GFP_KERNEL);
+ mem = kzalloc(size, GFP_KERNEL | __GFP_NOWARN);
if (mem == NULL) {
mem = vmalloc(size);
if (mem == NULL)