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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c
index db00b0591733..1246f61a5338 100644
--- a/drivers/s390/cio/chp.c
+++ b/drivers/s390/cio/chp.c
@@ -393,8 +393,7 @@ int chp_new(struct chp_id chpid)
393 chp->state = 1; 393 chp->state = 1;
394 chp->dev.parent = &channel_subsystems[chpid.cssid]->device; 394 chp->dev.parent = &channel_subsystems[chpid.cssid]->device;
395 chp->dev.release = chp_release; 395 chp->dev.release = chp_release;
396 snprintf(chp->dev.bus_id, BUS_ID_SIZE, "chp%x.%02x", chpid.cssid, 396 dev_set_name(&chp->dev, "chp%x.%02x", chpid.cssid, chpid.id);
397 chpid.id);
398 397
399 /* Obtain channel path description and fill it in. */ 398 /* Obtain channel path description and fill it in. */
400 ret = chsc_determine_base_channel_path_desc(chpid, &chp->desc); 399 ret = chsc_determine_base_channel_path_desc(chpid, &chp->desc);
@@ -423,7 +422,7 @@ int chp_new(struct chp_id chpid)
423 ret = sysfs_create_group(&chp->dev.kobj, &chp_attr_group); 422 ret = sysfs_create_group(&chp->dev.kobj, &chp_attr_group);
424 if (ret) { 423 if (ret) {
425 device_unregister(&chp->dev); 424 device_unregister(&chp->dev);
426 goto out_free; 425 goto out;
427 } 426 }
428 mutex_lock(&channel_subsystems[chpid.cssid]->mutex); 427 mutex_lock(&channel_subsystems[chpid.cssid]->mutex);
429 if (channel_subsystems[chpid.cssid]->cm_enabled) { 428 if (channel_subsystems[chpid.cssid]->cm_enabled) {
@@ -432,14 +431,15 @@ int chp_new(struct chp_id chpid)
432 sysfs_remove_group(&chp->dev.kobj, &chp_attr_group); 431 sysfs_remove_group(&chp->dev.kobj, &chp_attr_group);
433 device_unregister(&chp->dev); 432 device_unregister(&chp->dev);
434 mutex_unlock(&channel_subsystems[chpid.cssid]->mutex); 433 mutex_unlock(&channel_subsystems[chpid.cssid]->mutex);
435 goto out_free; 434 goto out;
436 } 435 }
437 } 436 }
438 channel_subsystems[chpid.cssid]->chps[chpid.id] = chp; 437 channel_subsystems[chpid.cssid]->chps[chpid.id] = chp;
439 mutex_unlock(&channel_subsystems[chpid.cssid]->mutex); 438 mutex_unlock(&channel_subsystems[chpid.cssid]->mutex);
440 return ret; 439 goto out;
441out_free: 440out_free:
442 kfree(chp); 441 kfree(chp);
442out:
443 return ret; 443 return ret;
444} 444}
445 445