|
@@ -564,12 +564,13 @@ acpi_video_device_find_cap (struct acpi_video_device *device)
|
|
int count = 0;
|
|
int count = 0;
|
|
union acpi_object *o;
|
|
union acpi_object *o;
|
|
|
|
|
|
- br = kmalloc(sizeof &br, GFP_KERNEL);
|
|
|
|
|
|
+ br = kmalloc(sizeof(*br), GFP_KERNEL);
|
|
if (!br) {
|
|
if (!br) {
|
|
printk(KERN_ERR "can't allocate memory\n");
|
|
printk(KERN_ERR "can't allocate memory\n");
|
|
} else {
|
|
} 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)
|
|
if (!br->levels)
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
@@ -584,8 +585,7 @@ acpi_video_device_find_cap (struct acpi_video_device *device)
|
|
}
|
|
}
|
|
out:
|
|
out:
|
|
if (count < 2) {
|
|
if (count < 2) {
|
|
- if (br->levels)
|
|
|
|
- kfree(br->levels);
|
|
|
|
|
|
+ kfree(br->levels);
|
|
kfree(br);
|
|
kfree(br);
|
|
} else {
|
|
} else {
|
|
br->count = count;
|
|
br->count = count;
|
|
@@ -595,8 +595,7 @@ out:
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (obj)
|
|
|
|
- kfree(obj);
|
|
|
|
|
|
+ kfree(obj);
|
|
|
|
|
|
return_VOID;
|
|
return_VOID;
|
|
}
|
|
}
|