diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 04:01:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:05 -0500 |
commit | 6044ec8882c726e325017bd948aa0cd94ad33abc (patch) | |
tree | 3bfc5dc93434e8ad556540f6689abcd2699aa45d /drivers/input/misc | |
parent | 2ea7533060e361810c21b2f5ee02151c4dfb85d8 (diff) |
[PATCH] kfree cleanup: misc remaining drivers
This is the remaining misc drivers/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in misc files in
drivers/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
Acked-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Pierre Ossman <drzeus@drzeus.cx>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Len Brown <len.brown@intel.com>
Acked-by: "Antonino A. Daplas" <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/input/misc')
-rw-r--r-- | drivers/input/misc/uinput.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index 4015a91f4b6e..948c1cc01bc9 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c | |||
@@ -271,8 +271,7 @@ static int uinput_alloc_device(struct file *file, const char __user *buffer, siz | |||
271 | goto exit; | 271 | goto exit; |
272 | } | 272 | } |
273 | 273 | ||
274 | if (dev->name) | 274 | kfree(dev->name); |
275 | kfree(dev->name); | ||
276 | 275 | ||
277 | size = strnlen(user_dev->name, UINPUT_MAX_NAME_SIZE) + 1; | 276 | size = strnlen(user_dev->name, UINPUT_MAX_NAME_SIZE) + 1; |
278 | dev->name = name = kmalloc(size, GFP_KERNEL); | 277 | dev->name = name = kmalloc(size, GFP_KERNEL); |
@@ -372,11 +371,8 @@ static int uinput_burn_device(struct uinput_device *udev) | |||
372 | if (test_bit(UIST_CREATED, &udev->state)) | 371 | if (test_bit(UIST_CREATED, &udev->state)) |
373 | uinput_destroy_device(udev); | 372 | uinput_destroy_device(udev); |
374 | 373 | ||
375 | if (udev->dev->name) | 374 | kfree(udev->dev->name); |
376 | kfree(udev->dev->name); | 375 | kfree(udev->dev->phys); |
377 | if (udev->dev->phys) | ||
378 | kfree(udev->dev->phys); | ||
379 | |||
380 | kfree(udev->dev); | 376 | kfree(udev->dev); |
381 | kfree(udev); | 377 | kfree(udev); |
382 | 378 | ||