From: Amir Shehata <[email protected]>

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 <[email protected]>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6502
Reviewed-on: http://review.whamcloud.com/15779
Reviewed-by: Dmitry Eremin <[email protected]>
Reviewed-by: James Simmons <[email protected]>
Reviewed-by: Oleg Drokin <[email protected]>
---
 drivers/staging/lustre/lnet/lnet/api-ni.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c 
b/drivers/staging/lustre/lnet/lnet/api-ni.c
index 7f5e0e8..6373de0 100644
--- a/drivers/staging/lustre/lnet/lnet/api-ni.c
+++ b/drivers/staging/lustre/lnet/lnet/api-ni.c
@@ -1931,7 +1931,7 @@ LNetCtl(unsigned int cmd, void *arg)
 
                net_config = (struct lnet_ioctl_net_config *)
                                config->cfg_bulk;
-               if (!config || !net_config)
+               if (!net_config)
                        return -1;
 
                return lnet_get_net_config(config->cfg_count,
-- 
1.7.1

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to