From: Henrique de Moraes Holschuh Date: Wed, 14 Feb 2007 12:55:00 +0000 (-0200) Subject: ACPI: bay: use IS_ERR for return of register_platform_device_simple X-Git-Tag: v2.6.21-rc1~92^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0539771d7236b425f285652f6f297cc7939c8f9a;p=linux-2.6 ACPI: bay: use IS_ERR for return of register_platform_device_simple register_platform_device_simple returns ERR_PTR(foo), so test it with IS_ERR(foo). Signed-off-by: Henrique de Moraes Holschuh Signed-off-by: Len Brown --- diff --git a/drivers/acpi/bay.c b/drivers/acpi/bay.c index 73dc10db4a..9c28081ba6 100644 --- a/drivers/acpi/bay.c +++ b/drivers/acpi/bay.c @@ -283,7 +283,7 @@ static int bay_add(acpi_handle handle, int id) /* initialize platform device stuff */ pdev = platform_device_register_simple(ACPI_BAY_CLASS, id, NULL, 0); - if (pdev == NULL) { + if (IS_ERR(pdev)) { printk(KERN_ERR PREFIX "Error registering bay device\n"); goto bay_add_err; }