aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/chp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/chp.c')
-rw-r--r--drivers/s390/cio/chp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c
index db00b0591733..f1216cf6fa8f 100644
--- a/drivers/s390/cio/chp.c
+++ b/drivers/s390/cio/chp.c
@@ -423,7 +423,7 @@ int chp_new(struct chp_id chpid)
423 ret = sysfs_create_group(&chp->dev.kobj, &chp_attr_group); 423 ret = sysfs_create_group(&chp->dev.kobj, &chp_attr_group);
424 if (ret) { 424 if (ret) {
425 device_unregister(&chp->dev); 425 device_unregister(&chp->dev);
426 goto out_free; 426 goto out;
427 } 427 }
428 mutex_lock(&channel_subsystems[chpid.cssid]->mutex); 428 mutex_lock(&channel_subsystems[chpid.cssid]->mutex);
429 if (channel_subsystems[chpid.cssid]->cm_enabled) { 429 if (channel_subsystems[chpid.cssid]->cm_enabled) {
@@ -432,14 +432,15 @@ int chp_new(struct chp_id chpid)
432 sysfs_remove_group(&chp->dev.kobj, &chp_attr_group); 432 sysfs_remove_group(&chp->dev.kobj, &chp_attr_group);
433 device_unregister(&chp->dev); 433 device_unregister(&chp->dev);
434 mutex_unlock(&channel_subsystems[chpid.cssid]->mutex); 434 mutex_unlock(&channel_subsystems[chpid.cssid]->mutex);
435 goto out_free; 435 goto out;
436 } 436 }
437 } 437 }
438 channel_subsystems[chpid.cssid]->chps[chpid.id] = chp; 438 channel_subsystems[chpid.cssid]->chps[chpid.id] = chp;
439 mutex_unlock(&channel_subsystems[chpid.cssid]->mutex); 439 mutex_unlock(&channel_subsystems[chpid.cssid]->mutex);
440 return ret; 440 goto out;
441out_free: 441out_free:
442 kfree(chp); 442 kfree(chp);
443out:
443 return ret; 444 return ret;
444} 445}
445 446