Skip to content

Commit

Permalink
fjes: fix missed check in fjes_acpi_add
Browse files Browse the repository at this point in the history
fjes_acpi_add() misses a check for platform_device_register_simple().
Add a check to fix it.

Fixes: 658d439 ("fjes: Introduce FUJITSU Extended Socket Network Device driver")
Signed-off-by: Chuhong Yuan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
WillLester authored and davem330 committed Dec 9, 2019
1 parent b43d1f9 commit a288f10
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/fjes/fjes_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ static int fjes_acpi_add(struct acpi_device *device)
/* create platform_device */
plat_dev = platform_device_register_simple(DRV_NAME, 0, fjes_resource,
ARRAY_SIZE(fjes_resource));
if (IS_ERR(plat_dev))
return PTR_ERR(plat_dev);

device->driver_data = plat_dev;

return 0;
Expand Down

0 comments on commit a288f10

Please sign in to comment.