Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -883,7 +883,7 @@ struct wl_private
	int                         is_registered;
	int                         is_handling_int;
	int                         firmware_present;
	char                        sysfsCreated;
	bool                        sysfsCreated;
	CFG_DRV_INFO_STRCT          driverInfo;
	CFG_IDENTITY_STRCT          driverIdentity;
	CFG_FW_IDENTITY_STRCT       StationIdentity;
+10 −8
Original line number Diff line number Diff line
@@ -122,8 +122,10 @@ void register_wlags_sysfs(struct net_device *net)
{
	struct device *dev = &(net->dev);
	struct wl_private *lp = wl_priv(net);

    lp->sysfsCreated = sysfs_create_group(&dev->kobj, &wlags_group);
	int err;
	err = sysfs_create_group(&dev->kobj, &wlags_group);
	if (!err)
		lp->sysfsCreated = true;
}

void unregister_wlags_sysfs(struct net_device *net)