diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/cxgb3/cxgb3_offload.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/cxgb3/cxgb3_offload.c b/drivers/net/cxgb3/cxgb3_offload.c index d48c396bdabb..901c824bfe6d 100644 --- a/drivers/net/cxgb3/cxgb3_offload.c +++ b/drivers/net/cxgb3/cxgb3_offload.c | |||
@@ -1070,9 +1070,7 @@ void *cxgb_alloc_mem(unsigned long size) | |||
1070 | */ | 1070 | */ |
1071 | void cxgb_free_mem(void *addr) | 1071 | void cxgb_free_mem(void *addr) |
1072 | { | 1072 | { |
1073 | unsigned long p = (unsigned long)addr; | 1073 | if (is_vmalloc_addr(addr)) |
1074 | |||
1075 | if (p >= VMALLOC_START && p < VMALLOC_END) | ||
1076 | vfree(addr); | 1074 | vfree(addr); |
1077 | else | 1075 | else |
1078 | kfree(addr); | 1076 | kfree(addr); |