From 64890edb8536618ee856fbca699fe930fcef1573 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 8 May 2014 15:52:14 +0200 Subject: [PATCH] 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 Cc: Ben Dooks Cc: Kukjin Kim Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Felipe Balbi --- drivers/usb/gadget/s3c2410_udc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index dd9678f85c58..7987aa049fab 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, ...)