Commit 4233c444 authored by Chuhong Yuan's avatar Chuhong Yuan Committed by Kleber Sacilotto de Souza

fjes: fix missed check in fjes_acpi_add

BugLink: https://bugs.launchpad.net/bugs/1858462

[ Upstream commit a288f105 ]

fjes_acpi_add() misses a check for platform_device_register_simple().
Add a check to fix it.

Fixes: 658d439b ("fjes: Introduce FUJITSU Extended Socket Network Device driver")
Signed-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarConnor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 4003e0b1
...@@ -149,6 +149,9 @@ static int fjes_acpi_add(struct acpi_device *device) ...@@ -149,6 +149,9 @@ static int fjes_acpi_add(struct acpi_device *device)
/* create platform_device */ /* create platform_device */
plat_dev = platform_device_register_simple(DRV_NAME, 0, fjes_resource, plat_dev = platform_device_register_simple(DRV_NAME, 0, fjes_resource,
ARRAY_SIZE(fjes_resource)); ARRAY_SIZE(fjes_resource));
if (IS_ERR(plat_dev))
return PTR_ERR(plat_dev);
device->driver_data = plat_dev; device->driver_data = plat_dev;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment