usbtmc: call pr_err instead of plain printk
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 15 Jul 2013 08:59:42 +0000 (11:59 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2013 19:01:12 +0000 (12:01 -0700)
Additionally remove useless label.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/usbtmc.c

index 92eaf9d6de8b0252b6feb35fc9a2f1cfcb940c67..21114ab99d968f700871ff1da9e60867e6e43e44 100644 (file)
@@ -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>
@@ -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);
@@ -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;
 }