aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/ft1000
diff options
context:
space:
mode:
authorDevendra Naga <devendra.aaru@gmail.com>2012-11-24 05:01:06 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-26 19:21:18 -0500
commitf884c19224dc190d47251031814857c652d8a563 (patch)
tree77551d808c7ca45d12ea79b95330bf9ed16702ab /drivers/staging/ft1000
parent64bce09563a2a4b7614583f14a7ee55b0e083949 (diff)
staging: ft1000: remove assigments of ret and initialise it in beginning
as ret is every time assigned to EINVAL in fail cases, initialise it at the beginning. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ft1000')
-rw-r--r--drivers/staging/ft1000/ft1000-usb/ft1000_proc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c
index 5ae39671613..1edaddba816 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c
@@ -205,7 +205,7 @@ int ft1000_init_proc(struct net_device *dev)
205{ 205{
206 struct ft1000_info *info; 206 struct ft1000_info *info;
207 struct proc_dir_entry *ft1000_proc_file; 207 struct proc_dir_entry *ft1000_proc_file;
208 int ret = 0; 208 int ret = -EINVAL;
209 209
210 info = netdev_priv(dev); 210 info = netdev_priv(dev);
211 211
@@ -213,7 +213,6 @@ int ft1000_init_proc(struct net_device *dev)
213 if (info->ft1000_proc_dir == NULL) { 213 if (info->ft1000_proc_dir == NULL) {
214 printk(KERN_WARNING "Unable to create %s dir.\n", 214 printk(KERN_WARNING "Unable to create %s dir.\n",
215 FT1000_PROC_DIR); 215 FT1000_PROC_DIR);
216 ret = -EINVAL;
217 goto fail; 216 goto fail;
218 } 217 }
219 218
@@ -223,7 +222,6 @@ int ft1000_init_proc(struct net_device *dev)
223 222
224 if (ft1000_proc_file == NULL) { 223 if (ft1000_proc_file == NULL) {
225 printk(KERN_WARNING "Unable to create /proc entry.\n"); 224 printk(KERN_WARNING "Unable to create /proc entry.\n");
226 ret = -EINVAL;
227 goto fail_entry; 225 goto fail_entry;
228 } 226 }
229 227