aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/chp.c
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2009-09-11 04:28:38 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-09-11 04:29:45 -0400
commitc6304933274f8e3cc6983d496456757ac8ab2e0b (patch)
tree7d9135cc2f391141650cc2d1740bd276a25f6141 /drivers/s390/cio/chp.c
parentc48ff644f2c86f34f69f382b68b16c6d30854783 (diff)
[S390] proper use of device register
Don't use kfree directly after device registration started. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/chp.c')
-rw-r--r--drivers/s390/cio/chp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c
index 3e5f304ad88f..40002830d48a 100644
--- a/drivers/s390/cio/chp.c
+++ b/drivers/s390/cio/chp.c
@@ -417,7 +417,8 @@ int chp_new(struct chp_id chpid)
417 if (ret) { 417 if (ret) {
418 CIO_MSG_EVENT(0, "Could not register chp%x.%02x: %d\n", 418 CIO_MSG_EVENT(0, "Could not register chp%x.%02x: %d\n",
419 chpid.cssid, chpid.id, ret); 419 chpid.cssid, chpid.id, ret);
420 goto out_free; 420 put_device(&chp->dev);
421 goto out;
421 } 422 }
422 ret = sysfs_create_group(&chp->dev.kobj, &chp_attr_group); 423 ret = sysfs_create_group(&chp->dev.kobj, &chp_attr_group);
423 if (ret) { 424 if (ret) {