X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;ds=inline;f=drivers%2Facpi%2Fosl.c;h=57ae1e5cde0a2400f8f060d88d7024dd89ba6ba1;hb=3a7122923e87fc5cdf8affa1845924a0def4657d;hp=02b30ae6a68edf4b8e433e6c0f3f19674d2e6159;hpb=4796b71fbb907ce6b8a9acf1852d3646a80b4576;p=powerpc.git diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 02b30ae6a6..57ae1e5cde 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -568,6 +568,7 @@ void acpi_os_derive_pci_id(acpi_handle rhandle, /* upper bound */ static void acpi_os_execute_deferred(struct work_struct *work) { struct acpi_os_dpc *dpc = container_of(work, struct acpi_os_dpc, work); + if (!dpc) { printk(KERN_ERR PREFIX "Invalid (NULL) context\n"); return; @@ -1031,7 +1032,7 @@ acpi_status acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t ** cache) { *cache = kmem_cache_create(name, size, 0, 0, NULL, NULL); - if (cache == NULL) + if (*cache == NULL) return AE_ERROR; else return AE_OK; @@ -1051,7 +1052,7 @@ acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t ** cache) acpi_status acpi_os_purge_cache(acpi_cache_t * cache) { - (void)kmem_cache_shrink(cache); + kmem_cache_shrink(cache); return (AE_OK); }