diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-01-11 17:47:25 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-01-11 17:47:25 -0800 |
commit | 009f773836513960d3982e80c86e266d25528563 (patch) | |
tree | 7315e5666698997dee34a80c1a1db801d3f8879b /drivers/staging/lustre/lustre/libcfs/libcfs_mem.c | |
parent | Input: i8042 - add Fujitsu Lifebook U745 to the nomux list (diff) | |
parent | Input: elantech - mark protocols v2 and v3 as semi-mt (diff) | |
download | linux-dev-009f773836513960d3982e80c86e266d25528563.tar.xz linux-dev-009f773836513960d3982e80c86e266d25528563.zip |
Merge branch 'next' into for-linus
Prepare first round of input updates for 4.5 merge window.
Diffstat (limited to 'drivers/staging/lustre/lustre/libcfs/libcfs_mem.c')
-rw-r--r-- | drivers/staging/lustre/lustre/libcfs/libcfs_mem.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/lustre/lustre/libcfs/libcfs_mem.c b/drivers/staging/lustre/lustre/libcfs/libcfs_mem.c index 1debdda72e72..f4e08daba4d9 100644 --- a/drivers/staging/lustre/lustre/libcfs/libcfs_mem.c +++ b/drivers/staging/lustre/lustre/libcfs/libcfs_mem.c @@ -84,7 +84,7 @@ cfs_percpt_alloc(struct cfs_cpt_table *cptab, unsigned int size) count = cfs_cpt_number(cptab); LIBCFS_ALLOC(arr, offsetof(struct cfs_var_array, va_ptrs[count])); - if (arr == NULL) + if (!arr) return NULL; arr->va_size = size = L1_CACHE_ALIGN(size); @@ -93,7 +93,7 @@ cfs_percpt_alloc(struct cfs_cpt_table *cptab, unsigned int size) for (i = 0; i < count; i++) { LIBCFS_CPT_ALLOC(arr->va_ptrs[i], cptab, i, size); - if (arr->va_ptrs[i] == NULL) { + if (!arr->va_ptrs[i]) { cfs_percpt_free((void *)&arr->va_ptrs[0]); return NULL; } @@ -160,7 +160,7 @@ cfs_array_free(void *vars) arr = container_of(vars, struct cfs_var_array, va_ptrs[0]); for (i = 0; i < arr->va_count; i++) { - if (arr->va_ptrs[i] == NULL) + if (!arr->va_ptrs[i]) continue; LIBCFS_FREE(arr->va_ptrs[i], arr->va_size); @@ -182,7 +182,7 @@ cfs_array_alloc(int count, unsigned int size) int i; LIBCFS_ALLOC(arr, offsetof(struct cfs_var_array, va_ptrs[count])); - if (arr == NULL) + if (!arr) return NULL; arr->va_count = count; @@ -191,7 +191,7 @@ cfs_array_alloc(int count, unsigned int size) for (i = 0; i < count; i++) { LIBCFS_ALLOC(arr->va_ptrs[i], size); - if (arr->va_ptrs[i] == NULL) { + if (!arr->va_ptrs[i]) { cfs_array_free((void *)&arr->va_ptrs[0]); return NULL; } |