Commit f884c192 authored by Devendra Naga's avatar Devendra Naga Committed by Greg Kroah-Hartman

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: default avatarDevendra Naga <devendra.aaru@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 64bce095
......@@ -205,7 +205,7 @@ int ft1000_init_proc(struct net_device *dev)
{
struct ft1000_info *info;
struct proc_dir_entry *ft1000_proc_file;
int ret = 0;
int ret = -EINVAL;
info = netdev_priv(dev);
......@@ -213,7 +213,6 @@ int ft1000_init_proc(struct net_device *dev)
if (info->ft1000_proc_dir == NULL) {
printk(KERN_WARNING "Unable to create %s dir.\n",
FT1000_PROC_DIR);
ret = -EINVAL;
goto fail;
}
......@@ -223,7 +222,6 @@ int ft1000_init_proc(struct net_device *dev)
if (ft1000_proc_file == NULL) {
printk(KERN_WARNING "Unable to create /proc entry.\n");
ret = -EINVAL;
goto fail_entry;
}
......
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