Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: heci: do not print error when heci_bh_handler is already on workqueue

schedule_work returns 0, if the work is already on the work_queue, else
returns non-zero. Do not print error message if heci_bh_handlerwork was
already on queue.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Dongxiao Xu and committed by
Greg Kroah-Hartman
8d1c50e9 ad914a3e

+4 -8
+4 -8
drivers/staging/heci/interrupt.c
··· 103 103 PREPARE_WORK(&dev->work, heci_bh_handler); 104 104 DBG("schedule work the heci_bh_handler.\n"); 105 105 err = schedule_work(&dev->work); 106 - if (!err) { 107 - printk(KERN_ERR "heci: schedule the heci_bh_handler" 108 - " failed error=%x\n", err); 109 - } 106 + if (!err) 107 + DBG("heci_bh_handler was already on the workqueue.\n"); 110 108 return IRQ_HANDLED; 111 109 } 112 110 ··· 258 260 PREPARE_WORK(&dev->work, heci_bh_handler); 259 261 DBG("schedule work the heci_bh_handler.\n"); 260 262 rets = schedule_work(&dev->work); 261 - if (!rets) { 262 - printk(KERN_ERR "heci: schedule the heci_bh_handler" 263 - " failed error=%x\n", rets); 264 - } 263 + if (!rets) 264 + DBG("heci_bh_handler was already queued.\n"); 265 265 } else { 266 266 heci_csr_enable_interrupts(dev); 267 267 }