diff options
Diffstat (limited to 'drivers/s390/net/claw.c')
-rw-r--r-- | drivers/s390/net/claw.c | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index 3092473991a7..1a1c3decea72 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
@@ -2743,14 +2743,10 @@ probe_error( struct ccwgroup_device *cgdev) | |||
2743 | #endif | 2743 | #endif |
2744 | privptr=(struct claw_privbk *)cgdev->dev.driver_data; | 2744 | privptr=(struct claw_privbk *)cgdev->dev.driver_data; |
2745 | if (privptr!=NULL) { | 2745 | if (privptr!=NULL) { |
2746 | if (privptr->p_env != NULL) { | 2746 | kfree(privptr->p_env); |
2747 | kfree(privptr->p_env); | 2747 | privptr->p_env=NULL; |
2748 | privptr->p_env=NULL; | 2748 | kfree(privptr->p_mtc_envelope); |
2749 | } | 2749 | privptr->p_mtc_envelope=NULL; |
2750 | if (privptr->p_mtc_envelope!=NULL) { | ||
2751 | kfree(privptr->p_mtc_envelope); | ||
2752 | privptr->p_mtc_envelope=NULL; | ||
2753 | } | ||
2754 | kfree(privptr); | 2750 | kfree(privptr); |
2755 | privptr=NULL; | 2751 | privptr=NULL; |
2756 | } | 2752 | } |
@@ -4121,22 +4117,14 @@ claw_remove_device(struct ccwgroup_device *cgdev) | |||
4121 | if (cgdev->state == CCWGROUP_ONLINE) | 4117 | if (cgdev->state == CCWGROUP_ONLINE) |
4122 | claw_shutdown_device(cgdev); | 4118 | claw_shutdown_device(cgdev); |
4123 | claw_remove_files(&cgdev->dev); | 4119 | claw_remove_files(&cgdev->dev); |
4124 | if (priv->p_mtc_envelope!=NULL) { | 4120 | kfree(priv->p_mtc_envelope); |
4125 | kfree(priv->p_mtc_envelope); | 4121 | priv->p_mtc_envelope=NULL; |
4126 | priv->p_mtc_envelope=NULL; | 4122 | kfree(priv->p_env); |
4127 | } | 4123 | priv->p_env=NULL; |
4128 | if (priv->p_env != NULL) { | 4124 | kfree(priv->channel[0].irb); |
4129 | kfree(priv->p_env); | 4125 | priv->channel[0].irb=NULL; |
4130 | priv->p_env=NULL; | 4126 | kfree(priv->channel[1].irb); |
4131 | } | 4127 | priv->channel[1].irb=NULL; |
4132 | if (priv->channel[0].irb != NULL) { | ||
4133 | kfree(priv->channel[0].irb); | ||
4134 | priv->channel[0].irb=NULL; | ||
4135 | } | ||
4136 | if (priv->channel[1].irb != NULL) { | ||
4137 | kfree(priv->channel[1].irb); | ||
4138 | priv->channel[1].irb=NULL; | ||
4139 | } | ||
4140 | kfree(priv); | 4128 | kfree(priv); |
4141 | cgdev->dev.driver_data=NULL; | 4129 | cgdev->dev.driver_data=NULL; |
4142 | cgdev->cdev[READ]->dev.driver_data = NULL; | 4130 | cgdev->cdev[READ]->dev.driver_data = NULL; |