Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0539771d authored by Henrique de Moraes Holschuh's avatar Henrique de Moraes Holschuh Committed by Len Brown
Browse files

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: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent ecb5f752
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}