Skip to content

Commit

Permalink
vxge: fix possible NULL dereference in vxge-traffic.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Beregalov authored and David S. Miller committed Apr 27, 2009
1 parent 41f8910 commit 4e204c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/vxge/vxge-traffic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4e204c1

Please sign in to comment.