

Fix two instances where we take &p instead of *p when calculating storage
size.

Also, kfree(NULL) is legal, so remove some unneeded checks.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/acpi/video.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff -puN drivers/acpi/video.c~acpi-video-pointer-size-fix drivers/acpi/video.c
--- 25/drivers/acpi/video.c~acpi-video-pointer-size-fix	2005-02-27 21:35:45.000000000 -0800
+++ 25-akpm/drivers/acpi/video.c	2005-02-27 21:37:17.000000000 -0800
@@ -568,8 +568,9 @@ acpi_video_device_find_cap (struct acpi_
 		if (!br) {
 			printk(KERN_ERR "can't allocate memory\n");
 		} else {
-			memset(br, 0, sizeof &br);
-			br->levels = kmalloc(obj->package.count * sizeof &br->levels, GFP_KERNEL);
+			memset(br, 0, sizeof *br);
+			br->levels = kmalloc(obj->package.count *
+					sizeof *(br->levels), GFP_KERNEL);
 			if (!br->levels)
 				goto out;
 
@@ -584,8 +585,7 @@ acpi_video_device_find_cap (struct acpi_
 			}
 out:
 			if (count < 2) {
-				if (br->levels)
-					kfree(br->levels);
+				kfree(br->levels);
 				kfree(br);
 			} else {
 				br->count = count;
@@ -595,8 +595,7 @@ out:
 		}
 	}
 
-	if (obj)
-		kfree(obj);
+	kfree(obj);
 
 	return_VOID;
 }
_
