Commit 4e204c10 authored by Alexander Beregalov's avatar Alexander Beregalov Committed by David S. Miller

vxge: fix possible NULL dereference in vxge-traffic.c

If vpath is NULL then hldev is NULL also.
Signed-off-by: default avatarAlexander Beregalov <a.beregalov@gmail.com>
Acked-by: default avatarRam Vepa <ram.vepa@neterion.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 41f89100
......@@ -1923,7 +1923,7 @@ enum vxge_hw_status __vxge_hw_vpath_alarm_process(
if (vpath == NULL) {
alarm_event = VXGE_HW_SET_LEVEL(VXGE_HW_EVENT_UNKNOWN,
alarm_event);
goto out;
goto out2;
}
hldev = vpath->hldev;
......@@ -2161,7 +2161,7 @@ enum vxge_hw_status __vxge_hw_vpath_alarm_process(
}
out:
hldev->stats.sw_dev_err_stats.vpath_alarms++;
out2:
if ((alarm_event == VXGE_HW_EVENT_ALARM_CLEARED) ||
(alarm_event == VXGE_HW_EVENT_UNKNOWN))
return VXGE_HW_OK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment