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

If vpath is NULL then hldev is NULL also.

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: Ram Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Alexander Beregalov 2009-04-23 15:31:38 +00:00 коммит произвёл David S. Miller
Родитель 41f8910040
Коммит 4e204c1000
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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;