diff options
author | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2007-02-14 07:55:00 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-16 18:35:23 -0500 |
commit | 0539771d7236b425f285652f6f297cc7939c8f9a (patch) | |
tree | 317a537794edc6e67741b24d5dd82a9f02cc3dcf /drivers/acpi | |
parent | ecb5f7521a309cb9c5fc0832b9705cd2a03d7d45 (diff) |
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 <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/bay.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/bay.c b/drivers/acpi/bay.c index 73dc10db4a88..9c28081ba6a6 100644 --- a/drivers/acpi/bay.c +++ b/drivers/acpi/bay.c | |||
@@ -283,7 +283,7 @@ static int bay_add(acpi_handle handle, int id) | |||
283 | 283 | ||
284 | /* initialize platform device stuff */ | 284 | /* initialize platform device stuff */ |
285 | pdev = platform_device_register_simple(ACPI_BAY_CLASS, id, NULL, 0); | 285 | pdev = platform_device_register_simple(ACPI_BAY_CLASS, id, NULL, 0); |
286 | if (pdev == NULL) { | 286 | if (IS_ERR(pdev)) { |
287 | printk(KERN_ERR PREFIX "Error registering bay device\n"); | 287 | printk(KERN_ERR PREFIX "Error registering bay device\n"); |
288 | goto bay_add_err; | 288 | goto bay_add_err; |
289 | } | 289 | } |