Skip to content

Commit

Permalink
usbtmc: call pr_err instead of plain printk
Browse files Browse the repository at this point in the history
Additionally remove useless label.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Andy Shevchenko authored and Greg Kroah-Hartman committed Jul 25, 2013
1 parent 92f78dd commit f4d844c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/usb/class/usbtmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
* http://www.gnu.org/copyleft/gpl.html.
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
Expand Down Expand Up @@ -130,10 +132,8 @@ static int usbtmc_open(struct inode *inode, struct file *filp)

intf = usb_find_interface(&usbtmc_driver, iminor(inode));
if (!intf) {
printk(KERN_ERR KBUILD_MODNAME
": can not find device for minor %d", iminor(inode));
retval = -ENODEV;
goto exit;
pr_err("can not find device for minor %d", iminor(inode));
return -ENODEV;
}

data = usb_get_intfdata(intf);
Expand All @@ -142,7 +142,6 @@ static int usbtmc_open(struct inode *inode, struct file *filp)
/* Store pointer in file structure's private data field */
filp->private_data = data;

exit:
return retval;
}

Expand Down

0 comments on commit f4d844c

Please sign in to comment.