From: Amir Shehata Date: Tue, 28 Jul 2015 20:29:18 +0000 (-0700) Subject: LU-6502 lnet: remove unnecessary NULL check X-Git-Tag: 2.7.58~45 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=5ebe1b768e7c8397036c94ca43848067269dbf50;p=fs%2Flustre-release.git LU-6502 lnet: remove unnecessary NULL check In LNetCtl():IOC_LIBCFS_GET_NET there is a check for config == NULL This is not necessary as it'll never be NULL. That's ensured before the call to LNetCtl. Signed-off-by: Amir Shehata Change-Id: Ib4d1ca5ca4a342f134e3102bcaf167e60f978b5f Reviewed-on: http://review.whamcloud.com/15779 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Dmitry Eremin Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index 2f7bbf3..7f6dd56 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -1946,7 +1946,7 @@ LNetCtl(unsigned int cmd, void *arg) net_config = (struct lnet_ioctl_net_config *) config->cfg_bulk; - if (config == NULL || net_config == NULL) + if (net_config == NULL) return -1; return lnet_get_net_config(config->cfg_count,