Message ID | 20190108174222.29121-1-kjlu@umn.edu |
---|---|
State | Awaiting Upstream |
Delegated to: | David Miller |
Headers | show |
Series | [v2] libertas: add checks for the return value of sysfs_create_group | expand |
Kangjie Lu <kjlu@umn.edu> wrote: > 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> Patch applied to wireless-drivers-next.git, thanks. 434256833d8e libertas: add checks for the return value of sysfs_create_group
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)
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> --- drivers/net/wireless/marvell/libertas/mesh.c | 5 +++++ 1 file changed, 5 insertions(+)