]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
staging: lustre: mdc: Removed unneeded NULL check
authorHenri Doreau <henri.doreau@cea.fr>
Mon, 3 Oct 2016 02:28:17 +0000 (22:28 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Oct 2016 08:24:32 +0000 (10:24 +0200)
Do not bother checking the return value of changelog_kuc_hdr()
against NULL since this value was dereferenced earlier.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4189
Reviewed-on: http://review.whamcloud.com/12919
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/mdc/mdc_request.c

index d996326d70d60f255da3727da06d9c95d2b4a9d8..206f5d013525164ce9484709ccb92795beae3d37 100644 (file)
@@ -1867,10 +1867,8 @@ static int mdc_changelog_send_thread(void *csdata)
 
        /* Send EOF no matter what our result */
        kuch = changelog_kuc_hdr(cs->cs_buf, sizeof(*kuch), cs->cs_flags);
-       if (kuch) {
-               kuch->kuc_msgtype = CL_EOF;
-               libcfs_kkuc_msg_put(cs->cs_fp, kuch);
-       }
+       kuch->kuc_msgtype = CL_EOF;
+       libcfs_kkuc_msg_put(cs->cs_fp, kuch);
 
 out:
        fput(cs->cs_fp);