From 5ebe1b768e7c8397036c94ca43848067269dbf50 Mon Sep 17 00:00:00 2001 From: Amir Shehata Date: Tue, 28 Jul 2015 13:29:18 -0700 Subject: [PATCH] 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 --- lnet/lnet/api-ni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- 1.8.3.1