From: Paulo Marques <pmarques@grupopie.com>

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 |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 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-03-09 00:55:00.000000000 -0800
+++ 25-akpm/drivers/acpi/video.c	2005-03-09 00:55:00.000000000 -0800
@@ -564,12 +564,13 @@ acpi_video_device_find_cap (struct acpi_
 		int count = 0;
 		union acpi_object *o;
 		
-		br = kmalloc(sizeof &br, GFP_KERNEL);
+		br = kmalloc(sizeof(*br), GFP_KERNEL);
 		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;
 }
_