Commit 1ca61671 authored by David Kilroy's avatar David Kilroy Committed by Greg Kroah-Hartman

staging: wlags49_h2: Handle sysfs_create_group return correctly

The function returns 0 on success and non-zero on error. So
correctly record the status so it is freed appropriately.
Signed-off-by: default avatarDavid Kilroy <kilroyd@googlemail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8122fa34
...@@ -883,7 +883,7 @@ struct wl_private ...@@ -883,7 +883,7 @@ struct wl_private
int is_registered; int is_registered;
int is_handling_int; int is_handling_int;
int firmware_present; int firmware_present;
char sysfsCreated; bool sysfsCreated;
CFG_DRV_INFO_STRCT driverInfo; CFG_DRV_INFO_STRCT driverInfo;
CFG_IDENTITY_STRCT driverIdentity; CFG_IDENTITY_STRCT driverIdentity;
CFG_FW_IDENTITY_STRCT StationIdentity; CFG_FW_IDENTITY_STRCT StationIdentity;
......
...@@ -122,8 +122,10 @@ void register_wlags_sysfs(struct net_device *net) ...@@ -122,8 +122,10 @@ void register_wlags_sysfs(struct net_device *net)
{ {
struct device *dev = &(net->dev); struct device *dev = &(net->dev);
struct wl_private *lp = wl_priv(net); struct wl_private *lp = wl_priv(net);
int err;
lp->sysfsCreated = sysfs_create_group(&dev->kobj, &wlags_group); err = sysfs_create_group(&dev->kobj, &wlags_group);
if (!err)
lp->sysfsCreated = true;
} }
void unregister_wlags_sysfs(struct net_device *net) void unregister_wlags_sysfs(struct net_device *net)
......
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