summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-07-15 11:59:42 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-25 12:01:12 -0700
commitf4d844cb6c073998db0c7fe3d76c6c070333054e (patch)
tree4fc069d29e7338b995729918da33257fa02da5d0
parent92f78ddb10eab664c8934f0f3a9f284167ac45f9 (diff)
downloadlinux-f4d844cb6c073998db0c7fe3d76c6c070333054e.tar.gz
linux-f4d844cb6c073998db0c7fe3d76c6c070333054e.tar.bz2
linux-f4d844cb6c073998db0c7fe3d76c6c070333054e.zip
usbtmc: call pr_err instead of plain printk
Additionally remove useless label. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/class/usbtmc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 92eaf9d6de8b..21114ab99d96 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -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;
}