aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/css.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/css.c')
-rw-r--r--drivers/s390/cio/css.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
index a09deea5d687..13eeea3d547f 100644
--- a/drivers/s390/cio/css.c
+++ b/drivers/s390/cio/css.c
@@ -623,9 +623,13 @@ init_channel_subsystem (void)
623 ret = device_register(&css[i]->device); 623 ret = device_register(&css[i]->device);
624 if (ret) 624 if (ret)
625 goto out_free; 625 goto out_free;
626 if (css_characteristics_avail && css_chsc_characteristics.secm) 626 if (css_characteristics_avail &&
627 device_create_file(&css[i]->device, 627 css_chsc_characteristics.secm) {
628 &dev_attr_cm_enable); 628 ret = device_create_file(&css[i]->device,
629 &dev_attr_cm_enable);
630 if (ret)
631 goto out_device;
632 }
629 } 633 }
630 css_init_done = 1; 634 css_init_done = 1;
631 635
@@ -633,6 +637,8 @@ init_channel_subsystem (void)
633 637
634 for_each_subchannel(__init_channel_subsystem, NULL); 638 for_each_subchannel(__init_channel_subsystem, NULL);
635 return 0; 639 return 0;
640out_device:
641 device_unregister(&css[i]->device);
636out_free: 642out_free:
637 kfree(css[i]); 643 kfree(css[i]);
638out_unregister: 644out_unregister: