diff options
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r-- | drivers/s390/cio/device.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 3c57c1a18bb8..d593bc76afe3 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -772,10 +772,8 @@ static struct ccw_device * io_subchannel_create_ccwdev(struct subchannel *sch) | |||
772 | cdev = io_subchannel_allocate_dev(sch); | 772 | cdev = io_subchannel_allocate_dev(sch); |
773 | if (!IS_ERR(cdev)) { | 773 | if (!IS_ERR(cdev)) { |
774 | ret = io_subchannel_initialize_dev(sch, cdev); | 774 | ret = io_subchannel_initialize_dev(sch, cdev); |
775 | if (ret) { | 775 | if (ret) |
776 | kfree(cdev); | ||
777 | cdev = ERR_PTR(ret); | 776 | cdev = ERR_PTR(ret); |
778 | } | ||
779 | } | 777 | } |
780 | return cdev; | 778 | return cdev; |
781 | } | 779 | } |