diff options
author | Tobin C. Harding <me@tobin.cc> | 2017-03-13 12:37:33 +1100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-14 06:27:31 +0800 |
commit | 7261fb9bcb40251e4d3153f30624bffe1bba914d (patch) | |
tree | 036b1579a757fb65eb42d23a1a30818335fd8756 /drivers/staging/dgnc/dgnc_driver.c | |
parent | 93cf5f43421513ee6c07da68903221003a490f11 (diff) |
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: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgnc/dgnc_driver.c')
-rw-r--r-- | drivers/staging/dgnc/dgnc_driver.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index e970d2dbf659..0fd6f77dd04f 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -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 @@ unregister_tty: 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; } |