From: Henri Doreau <henri.dor...@cea.fr>

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.dor...@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.hamm...@intel.com>
Reviewed-by: Faccini Bruno <bruno.facc...@intel.com>
Reviewed-by: Oleg Drokin <oleg.dro...@intel.com>
Signed-off-by: James Simmons <jsimm...@infradead.org>
---
 drivers/staging/lustre/lustre/mdc/mdc_request.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c 
b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index d996326..206f5d0 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -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);
-- 
1.7.1

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to