diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2013-07-15 04:59:42 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-25 15:01:12 -0400 |
commit | f4d844cb6c073998db0c7fe3d76c6c070333054e (patch) | |
tree | 4fc069d29e7338b995729918da33257fa02da5d0 /drivers/usb/class | |
parent | 92f78ddb10eab664c8934f0f3a9f284167ac45f9 (diff) |
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>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r-- | drivers/usb/class/usbtmc.c | 9 |
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 @@ | |||
19 | * http://www.gnu.org/copyleft/gpl.html. | 19 | * http://www.gnu.org/copyleft/gpl.html. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
23 | |||
22 | #include <linux/init.h> | 24 | #include <linux/init.h> |
23 | #include <linux/module.h> | 25 | #include <linux/module.h> |
24 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
@@ -130,10 +132,8 @@ static int usbtmc_open(struct inode *inode, struct file *filp) | |||
130 | 132 | ||
131 | intf = usb_find_interface(&usbtmc_driver, iminor(inode)); | 133 | intf = usb_find_interface(&usbtmc_driver, iminor(inode)); |
132 | if (!intf) { | 134 | if (!intf) { |
133 | printk(KERN_ERR KBUILD_MODNAME | 135 | pr_err("can not find device for minor %d", iminor(inode)); |
134 | ": can not find device for minor %d", iminor(inode)); | 136 | return -ENODEV; |
135 | retval = -ENODEV; | ||
136 | goto exit; | ||
137 | } | 137 | } |
138 | 138 | ||
139 | data = usb_get_intfdata(intf); | 139 | data = usb_get_intfdata(intf); |
@@ -142,7 +142,6 @@ static int usbtmc_open(struct inode *inode, struct file *filp) | |||
142 | /* Store pointer in file structure's private data field */ | 142 | /* Store pointer in file structure's private data field */ |
143 | filp->private_data = data; | 143 | filp->private_data = data; |
144 | 144 | ||
145 | exit: | ||
146 | return retval; | 145 | return retval; |
147 | } | 146 | } |
148 | 147 | ||