Skip to content

Commit

Permalink
libertas: add checks for the return value of sysfs_create_group
Browse files Browse the repository at this point in the history
sysfs_create_group() could fail. The fix checkes its return values
and issue error messages if it fails.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  • Loading branch information
kengiter authored and Kalle Valo committed Feb 1, 2019
1 parent db040df commit 4342568
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/wireless/marvell/libertas/mesh.c
Expand Up @@ -797,7 +797,12 @@ static void lbs_persist_config_init(struct net_device *dev)
{
int ret;
ret = sysfs_create_group(&(dev->dev.kobj), &boot_opts_group);
if (ret)
pr_err("failed to create boot_opts_group.\n");

ret = sysfs_create_group(&(dev->dev.kobj), &mesh_ie_group);
if (ret)
pr_err("failed to create mesh_ie_group.\n");
}

static void lbs_persist_config_remove(struct net_device *dev)
Expand Down

0 comments on commit 4342568

Please sign in to comment.