From 4c2a701e25638c1f23900c36979854336c57a66a Mon Sep 17 00:00:00 2001 From: Kurt Kanzenbach Date: Thu, 4 Apr 2013 16:03:09 +0200 Subject: [PATCH] --- yaml --- r: 363886 b: refs/heads/master c: 2183b77ece517fe4a17cae59d227d341b9d271c8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/staging/usbip/stub_main.c | 26 ++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index 201489d517bf..2b3dc826f0a0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 31398f6307d52fcb5aca6481fa4c84100aea97e3 +refs/heads/master: 2183b77ece517fe4a17cae59d227d341b9d271c8 diff --git a/trunk/drivers/staging/usbip/stub_main.c b/trunk/drivers/staging/usbip/stub_main.c index 705a9e530a19..629bfcbcb9b0 100644 --- a/trunk/drivers/staging/usbip/stub_main.c +++ b/trunk/drivers/staging/usbip/stub_main.c @@ -167,22 +167,22 @@ 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) { + + pr_debug("add busid %s\n", busid); + return count; + } + + 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; + + pr_debug("del busid %s\n", busid); + return count; } + + return -EINVAL; } static DRIVER_ATTR(match_busid, S_IRUSR | S_IWUSR, show_match_busid, store_match_busid);