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

Commit 2183b77e authored by Kurt Kanzenbach's avatar Kurt Kanzenbach Committed by Greg Kroah-Hartman
Browse files

staging: usbip: removed unnecessary if-else-statements



In each if-else case "return" is called. This is why
these if-else-statements are useless. Removing them
improves understanding and readability.

Signed-off-by: default avatarKurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: default avatarStefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 31398f63
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -167,23 +167,23 @@ static ssize_t store_match_busid(struct device_driver *dev, const char *buf,
	strncpy(busid, buf + 4, BUSID_SIZE);

	if (!strncmp(buf, "add ", 4)) {
		if (add_match_busid(busid) < 0) {
		if (add_match_busid(busid) < 0)
			return -ENOMEM;
		} else {

		pr_debug("add busid %s\n", busid);
		return count;
	}
	} else if (!strncmp(buf, "del ", 4)) {
		if (del_match_busid(busid) < 0) {

	if (!strncmp(buf, "del ", 4)) {
		if (del_match_busid(busid) < 0)
			return -ENODEV;
		} else {

		pr_debug("del busid %s\n", busid);
		return count;
	}
	} else {

	return -EINVAL;
}
}
static DRIVER_ATTR(match_busid, S_IRUSR | S_IWUSR, show_match_busid,
		   store_match_busid);