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

Commit 7388754e authored by Ville Syrjala's avatar Ville Syrjala Committed by Dmitry Torokhov
Browse files

Input: ati_remote2 - return the error code from sysfs channel_mask store



If the channel_mask setup fails when configuring it through sysfs,
return the error code to the caller instead of claiming success.

Signed-off-by: default avatarVille Syrjala <syrjala@sci.fi>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 9cc7c80b
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -737,14 +737,17 @@ static ssize_t ati_remote2_store_channel_mask(struct device *dev,

	mutex_lock(&ati_remote2_mutex);

	if (mask != ar2->channel_mask && !ati_remote2_setup(ar2, mask))
	if (mask != ar2->channel_mask) {
		r = ati_remote2_setup(ar2, mask);
		if (!r)
			ar2->channel_mask = mask;
	}

	mutex_unlock(&ati_remote2_mutex);

	usb_autopm_put_interface(ar2->intf[0]);

	return count;
	return r ? r : count;
}

static ssize_t ati_remote2_show_mode_mask(struct device *dev,