From: Henri Doreau Date: Mon, 3 Oct 2016 02:28:17 +0000 (-0400) Subject: staging: lustre: mdc: Removed unneeded NULL check X-Git-Tag: v5.15~12305^2~769 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ffa4ec96c8c54f2ad893aba6f833f20e9864d32;p=platform%2Fkernel%2Flinux-starfive.git staging: lustre: mdc: Removed unneeded NULL check Do not bother checking the return value of changelog_kuc_hdr() against NULL since this value was dereferenced earlier. Signed-off-by: Henri Doreau Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4189 Reviewed-on: http://review.whamcloud.com/12919 Reviewed-by: John L. Hammond Reviewed-by: Faccini Bruno Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- 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);