kernel-ark/drivers/infiniband
Pan Bian 46d0703fac IB/mlx4: fix improper return value
If uhw->inlen is non-zero, the value of variable err is 0 if the copy
succeeds. Then, if kzalloc() or kmalloc() returns a NULL pointer, it
will return 0 to the callers. As a result, the callers cannot detect the
errors. This patch fixes the bug, assign "-ENOMEM" to err before the
NULL pointer checks, and remove the initialization of err at the
beginning.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189031
Signed-off-by: Pan Bian <bianpan2016@163.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2016-12-14 14:35:23 -05:00
..
core IB/core: fix unmap_sg argument 2016-12-14 14:21:26 -05:00
hw IB/mlx4: fix improper return value 2016-12-14 14:35:23 -05:00
sw kthread: kthread worker API cleanup 2016-10-11 15:06:33 -07:00
ulp IPoIB: Avoid reading an uninitialized member variable 2016-12-14 13:27:34 -05:00
Kconfig qedr: Add RoCE driver framework 2016-10-14 15:00:10 -04:00
Makefile IB/rdmavt: Create module framework and handle driver registration 2016-03-10 20:37:04 -05:00