From: Adrian Bunk Date: Tue, 19 Dec 2006 20:56:13 +0000 (-0800) Subject: ACPI: fix NULL check in drivers/acpi/osl.c X-Git-Tag: v2.6.20-rc2~6^2~3^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6fdbf90b94fa4e2f5f7cbb526c71160b6c561c8;p=linux-2.6 ACPI: fix NULL check in drivers/acpi/osl.c Spotted by the Coverity checker. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Len Brown --- diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index c84286cbbe..e10679ce1e 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -1032,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;