Commit 7261fb9b authored by Tobin C. Harding's avatar Tobin C. Harding Committed by Greg Kroah-Hartman

staging: dgnc: fix whitespace before return

Checkpatch emits CHECK: Blank lines aren't necessary before a close
brace '}'. Previous attempts were made to make uniform the error
handling in dgnc but improvements are still possible.

Undo whitespace changes that should not have been made :(. Make return
statement placement uniform throughout dgnc. Fix checkpatch
CHECK. Make whitespace changes only.
Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 93cf5f43
......@@ -280,6 +280,7 @@ static struct dgnc_board *dgnc_found_board(struct pci_dev *pdev, int id)
failed:
kfree(brd);
return ERR_PTR(rc);
}
......@@ -411,6 +412,7 @@ static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
brd->dpastatus = BD_RUNNING;
dgnc_board[dgnc_num_boards++] = brd;
return 0;
free_irq:
......@@ -419,6 +421,7 @@ static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dgnc_tty_unregister(brd);
failed:
kfree(brd);
return rc;
}
......@@ -477,12 +480,14 @@ static int dgnc_start(void)
spin_unlock_irqrestore(&dgnc_poll_lock, flags);
add_timer(&dgnc_poll_timer);
return 0;
failed_device:
class_destroy(dgnc_class);
failed_class:
unregister_chrdev(dgnc_major, "dgnc");
return rc;
}
......@@ -596,7 +601,6 @@ static int __init dgnc_init_module(void)
cleanup();
return rc;
}
return 0;
}
......
......@@ -60,6 +60,7 @@ int dgnc_mgmt_open(struct inode *inode, struct file *file)
out:
spin_unlock_irqrestore(&dgnc_global_lock, flags);
return rc;
}
......@@ -85,6 +86,7 @@ int dgnc_mgmt_close(struct inode *inode, struct file *file)
out:
spin_unlock_irqrestore(&dgnc_global_lock, flags);
return rc;
}
......@@ -253,6 +255,5 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
break;
}
}
return 0;
}
......@@ -218,6 +218,7 @@ int dgnc_tty_register(struct dgnc_board *brd)
tty_unregister_driver(brd->serial_driver);
free_serial_driver:
put_tty_driver(brd->serial_driver);
return rc;
}
......@@ -319,6 +320,7 @@ int dgnc_tty_init(struct dgnc_board *brd)
kfree(brd->channels[i]);
brd->channels[i] = NULL;
}
return rc;
}
......@@ -1081,11 +1083,12 @@ static int dgnc_tty_open(struct tty_struct *tty, struct file *file)
err_brd_unlock:
spin_unlock_irqrestore(&brd->bd_lock, flags);
return rc;
err_ch_unlock:
spin_unlock_irqrestore(&ch->ch_lock, flags);
return rc;
return rc;
}
/*
......@@ -1212,6 +1215,7 @@ static int dgnc_block_til_ready(struct tty_struct *tty,
ch->ch_wopen--;
spin_unlock_irqrestore(&ch->ch_lock, flags);
return rc;
}
......@@ -1660,6 +1664,7 @@ static int dgnc_tty_write(struct tty_struct *tty,
exit_retry:
spin_unlock_irqrestore(&ch->ch_lock, flags);
return 0;
}
......@@ -2400,7 +2405,6 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
return -ENODEV;
rc = ch_bd_ops->drain(tty, 0);
if (rc)
return -EINTR;
......@@ -2787,5 +2791,6 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
}
err_unlock:
spin_unlock_irqrestore(&ch->ch_lock, flags);
return rc;
}
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