summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKangjie Lu <kjlu@umn.edu>2019-01-08 20:42:21 +0300
committerKalle Valo <kvalo@codeaurora.org>2019-02-01 15:06:28 +0300
commit434256833d8eb988cb7f3b8a41699e2fe48d9332 (patch)
tree12d729f5cd66308019b249f5465df1c67c3200ba
parentdb040dfa53e2905111e400b28d0bd6f38c78d348 (diff)
downloadlinux-434256833d8eb988cb7f3b8a41699e2fe48d9332.tar.xz
libertas: add checks for the return value of sysfs_create_group
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>
-rw-r--r--drivers/net/wireless/marvell/libertas/mesh.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/marvell/libertas/mesh.c b/drivers/net/wireless/marvell/libertas/mesh.c
index b0cb16ef8d1d..2315fdff56c2 100644
--- a/drivers/net/wireless/marvell/libertas/mesh.c
+++ b/drivers/net/wireless/marvell/libertas/mesh.c
@@ -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)