Commit f4d844cb authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

usbtmc: call pr_err instead of plain printk

Additionally remove useless label.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 92f78ddb
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
* http://www.gnu.org/copyleft/gpl.html. * http://www.gnu.org/copyleft/gpl.html.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -130,10 +132,8 @@ static int usbtmc_open(struct inode *inode, struct file *filp) ...@@ -130,10 +132,8 @@ static int usbtmc_open(struct inode *inode, struct file *filp)
intf = usb_find_interface(&usbtmc_driver, iminor(inode)); intf = usb_find_interface(&usbtmc_driver, iminor(inode));
if (!intf) { if (!intf) {
printk(KERN_ERR KBUILD_MODNAME pr_err("can not find device for minor %d", iminor(inode));
": can not find device for minor %d", iminor(inode)); return -ENODEV;
retval = -ENODEV;
goto exit;
} }
data = usb_get_intfdata(intf); data = usb_get_intfdata(intf);
...@@ -142,7 +142,6 @@ static int usbtmc_open(struct inode *inode, struct file *filp) ...@@ -142,7 +142,6 @@ static int usbtmc_open(struct inode *inode, struct file *filp)
/* Store pointer in file structure's private data field */ /* Store pointer in file structure's private data field */
filp->private_data = data; filp->private_data = data;
exit:
return retval; return retval;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment