drivers/acpi/osl.c: fix a NULL check
PATCH 6/19 drivers/acpi/osl.c: fix a NULL check
From: Adrian Bunk <[email protected]>
This patch fixes a non-working NULL check introduced by commit b229cf92eee616c7cb5ad8cdb35a19b119f00bc8.
Spotted by the Coverity checker.
---
drivers/acpi/osl.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/osl.c renamed from drivers/acpi/osl.c~drivers-acpi-oslc-fix-a-null-check +1 -1
@@ -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 ;
_
Applied.
(note the comment was incorrect this was introduced long before that commit).
Thanks Coverity, Adrian,
-Len
Quoted 28 lines · On Tuesday 19 December 2006 15:56, [email protected] wrote:
From: Adrian Bunk <[email protected]>
This patch fixes a non-working NULL check introduced by commit
b229cf92eee616c7cb5ad8cdb35a19b119f00bc8.Spotted by the Coverity checker.
Signed-off-by Adrian Bunk <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
drivers/acpi/osl.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)diff -puN
drivers/acpi/osl.c~drivers-acpi-oslc-fix-a-null-checkdrivers/acpi/osl.cdrivers/acpi/osl.c renamed from drivers/acpi/osl.c~drivers-acpi-oslc-fix-a-null-check +1
-1@@ -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 ;_
Quoted 3 lines · Len Brown
Applied.
(note the comment was incorrect this was introduced long before that commit).
It was introduced by this commit since this commit added the NULL check.
Quoted 18 lines
Thanks Coverity, Adrian,
-LenQuoted 14 lines · On Tuesday 19 December 2006 15:56, [email protected] wrote:
From: Adrian Bunk <[email protected]>
This patch fixes a non-working NULL check introduced by commit
b229cf92eee616c7cb5ad8cdb35a19b119f00bc8.Spotted by the Coverity checker.
Signed-off-by Adrian Bunk <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
drivers/acpi/osl.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines
Quoted 12 lines
diff -puN
drivers/acpi/osl.c~drivers-acpi-oslc-fix-a-null-checkdrivers/acpi/osl.cdrivers/acpi/osl.c renamed from drivers/acpi/osl.c~drivers-acpi-oslc-fix-a-null-check +1
-1@@ -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 ;Quoted 2 lines
_
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed