summaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/monreader.c
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2009-09-11 10:28:38 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-09-11 10:29:45 +0200
commitc6304933274f8e3cc6983d496456757ac8ab2e0b (patch)
tree7d9135cc2f391141650cc2d1740bd276a25f6141 /drivers/s390/char/monreader.c
parentc48ff644f2c86f34f69f382b68b16c6d30854783 (diff)
downloadtalos-op-linux-c6304933274f8e3cc6983d496456757ac8ab2e0b.tar.gz
talos-op-linux-c6304933274f8e3cc6983d496456757ac8ab2e0b.zip
[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/char/monreader.c')
-rw-r--r--drivers/s390/char/monreader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c
index 3234e90bd7f9..89ece1c235aa 100644
--- a/drivers/s390/char/monreader.c
+++ b/drivers/s390/char/monreader.c
@@ -581,7 +581,7 @@ static int __init mon_init(void)
monreader_device->release = (void (*)(struct device *))kfree;
rc = device_register(monreader_device);
if (rc) {
- kfree(monreader_device);
+ put_device(monreader_device);
goto out_driver;
}
OpenPOWER on IntegriCloud