]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
vxge: fix possible NULL dereference in vxge-traffic.c
authorAlexander Beregalov <a.beregalov@gmail.com>
Thu, 23 Apr 2009 15:31:38 +0000 (15:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Apr 2009 10:02:46 +0000 (03:02 -0700)
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>
drivers/net/vxge/vxge-traffic.c

index 7be0ae10d69b196233c0f1f741f91aa328041a5f..506625b180ace5c10fc7bbeacfa8053483d7b706 100644 (file)
@@ -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;