]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/cifs/misc.c
Merge tag 'drm-for-v4.12' of git://people.freedesktop.org/~airlied/linux
[karo-tx-linux.git] / fs / cifs / misc.c
index d3fb11529ed96054ac753a9e26898942bb708d56..843787850435087f908c1dec15e28669687d9f2b 100644 (file)
@@ -167,13 +167,11 @@ cifs_buf_get(void)
 
        /* clear the first few header bytes */
        /* for most paths, more is cleared in header_assemble */
-       if (ret_buf) {
-               memset(ret_buf, 0, buf_size + 3);
-               atomic_inc(&bufAllocCount);
+       memset(ret_buf, 0, buf_size + 3);
+       atomic_inc(&bufAllocCount);
 #ifdef CONFIG_CIFS_STATS2
-               atomic_inc(&totBufAllocCount);
+       atomic_inc(&totBufAllocCount);
 #endif /* CONFIG_CIFS_STATS2 */
-       }
 
        return ret_buf;
 }
@@ -201,15 +199,13 @@ cifs_small_buf_get(void)
    albeit slightly larger than necessary and maxbuffersize
    defaults to this and can not be bigger */
        ret_buf = mempool_alloc(cifs_sm_req_poolp, GFP_NOFS);
-       if (ret_buf) {
        /* No need to clear memory here, cleared in header assemble */
        /*      memset(ret_buf, 0, sizeof(struct smb_hdr) + 27);*/
-               atomic_inc(&smBufAllocCount);
+       atomic_inc(&smBufAllocCount);
 #ifdef CONFIG_CIFS_STATS2
-               atomic_inc(&totSmBufAllocCount);
+       atomic_inc(&totSmBufAllocCount);
 #endif /* CONFIG_CIFS_STATS2 */
 
-       }
        return ret_buf;
 }