summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Chen <dennis1.chen@amd.com>2012-04-11 14:28:05 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-04-11 14:28:24 +0200
commitdae1df42f544ce3969d437dfa835169210593240 (patch)
tree2c396c7ff74c6855261e6aaefce8e5e2fd89324a
parentcd10502b8276b0486850685383243cbd26d50c8d (diff)
[S390] s390/char/vmur.c: fix memory leak
This patch is used to fix a memory leak issue in s390/char/vmur.c. A character device instance is allocated by cdev_alloc, the cdev_del will not free that space if cdev_init is applied before. Signed-off-by: Dennis Chen <dennis1.chen@amd.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--drivers/s390/char/vmur.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c
index 85f4a9a5d12e..73bef0bd394c 100644
--- a/drivers/s390/char/vmur.c
+++ b/drivers/s390/char/vmur.c
@@ -903,7 +903,7 @@ static int ur_set_online(struct ccw_device *cdev)
goto fail_urdev_put;
}
- cdev_init(urd->char_device, &ur_fops);
+ urd->char_device->ops = &ur_fops;
urd->char_device->dev = MKDEV(major, minor);
urd->char_device->owner = ur_fops.owner;