ctcm: remove BUG_ONs
authorUrsula Braun <ursula.braun@de.ibm.com>
Mon, 19 Nov 2012 02:46:46 +0000 (02:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Nov 2012 19:19:00 +0000 (14:19 -0500)
Remove BUG_ON's in ctcm driver, since the checked error conditions
are null pointer accesses.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/ctcm_main.c
drivers/s390/net/ctcm_mpc.c

index 98ea9cc6f1aaba9f442ecb4b46724c0f3f5ccd7b..817b68925dddbd5c097129e6da6be7f41c77bdc8 100644 (file)
@@ -1691,8 +1691,6 @@ static void ctcm_remove_device(struct ccwgroup_device *cgdev)
 {
        struct ctcm_priv *priv = dev_get_drvdata(&cgdev->dev);
 
-       BUG_ON(priv == NULL);
-
        CTCM_DBF_TEXT_(SETUP, CTC_DBF_INFO,
                        "removing device %p, proto : %d",
                        cgdev, priv->protocol);
index 05b734a2b5b7ae09f33f2a7307948e232e4f253f..2dbc77b5137bacb4e3d283ed6b0eea4fa45c8395 100644 (file)
@@ -1367,7 +1367,6 @@ static void mpc_action_go_inop(fsm_instance *fi, int event, void *arg)
        struct mpc_group *grp;
        struct channel *wch;
 
-       BUG_ON(dev == NULL);
        CTCM_PR_DEBUG("Enter %s: %s\n", __func__, dev->name);
 
        priv  = dev->ml_priv;
@@ -1472,8 +1471,6 @@ static void mpc_action_timeout(fsm_instance *fi, int event, void *arg)
        struct channel *wch;
        struct channel *rch;
 
-       BUG_ON(dev == NULL);
-
        priv = dev->ml_priv;
        grp = priv->mpcg;
        wch = priv->channel[CTCM_WRITE];