diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-09-21 15:29:30 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-09-25 14:24:27 -0400 |
commit | 77c24888b7693eecee904308e0ee51f7f1f564df (patch) | |
tree | 488f1d22e80ebae8ad55a7a34de1e2812e110cb3 /drivers/acpi/scan.c | |
parent | c7bcb4e98aca348f6f8ab432496ff35ba7a49a1d (diff) |
ACPI: remove unnecessary argument checking
acpi_add_single_object() is static, and all callers supply a valid "child"
argument, so we don't need to check it. This patch also remove some
unnecessary initializations.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r-- | drivers/acpi/scan.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 6c83342d13d5..f2e283426be9 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -1222,14 +1222,10 @@ acpi_add_single_object(struct acpi_device **child, | |||
1222 | struct acpi_device *parent, acpi_handle handle, int type, | 1222 | struct acpi_device *parent, acpi_handle handle, int type, |
1223 | struct acpi_bus_ops *ops) | 1223 | struct acpi_bus_ops *ops) |
1224 | { | 1224 | { |
1225 | int result = 0; | 1225 | int result; |
1226 | struct acpi_device *device = NULL; | 1226 | struct acpi_device *device; |
1227 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 1227 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
1228 | 1228 | ||
1229 | |||
1230 | if (!child) | ||
1231 | return -EINVAL; | ||
1232 | |||
1233 | device = kzalloc(sizeof(struct acpi_device), GFP_KERNEL); | 1229 | device = kzalloc(sizeof(struct acpi_device), GFP_KERNEL); |
1234 | if (!device) { | 1230 | if (!device) { |
1235 | printk(KERN_ERR PREFIX "Memory allocation error\n"); | 1231 | printk(KERN_ERR PREFIX "Memory allocation error\n"); |