summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-05-08 15:52:14 +0200
committerFelipe Balbi <balbi@ti.com>2014-05-14 09:23:31 -0500
commit64890edb8536618ee856fbca699fe930fcef1573 (patch)
treee052931cdd5d5b8f7c33998735a8e71112627a70 /drivers/usb/gadget
parent966036fde60e6d96708815e0d495692ac352acf9 (diff)
usb: gadget: s3c2410_udc: don't use pr_debug return value
pr_debug() may be defined as "do { } while (0)" in some configurations, which means one cannot rely on the return value to be available. In the dprintk function in this driver, we can work around the resulting build error trivially by returning the length that this function already knows and ignoring the return value of pr_debug. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/s3c2410_udc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c
index dd9678f85c5..7987aa049fa 100644
--- a/drivers/usb/gadget/s3c2410_udc.c
+++ b/drivers/usb/gadget/s3c2410_udc.c
@@ -117,7 +117,8 @@ static int dprintk(int level, const char *fmt, ...)
sizeof(printk_buf)-len, fmt, args);
va_end(args);
- return pr_debug("%s", printk_buf);
+ pr_debug("%s", printk_buf);
+ return len;
}
#else
static int dprintk(int level, const char *fmt, ...)