diff options
author | Tobin C. Harding <me@tobin.cc> | 2017-03-28 10:28:38 +1100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-29 09:37:10 +0200 |
commit | 0053fe0eba9f5d6a992e0e4b45595a55809fc27b (patch) | |
tree | 26237acf170f0ffff9cc65a36a4a308c8560eea9 /drivers/staging/dgnc/dgnc_driver.c | |
parent | 510616521f1c1ce68da84bbcceab61b35abdce6f (diff) |
staging: dgnc: remove struct member magic numbers
Driver uses magic number members within structs, this is an antiquated
method of catching data errors. We don't do things that way any more.
Remove magic number struct members. Remove all checks to magic
numbers.
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 | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index 91c4fab1cd89..253f38b25a54 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -110,7 +110,6 @@ static struct dgnc_board *dgnc_found_board(struct pci_dev *pdev, int id) return ERR_PTR(-ENOMEM); /* store the info for the board we've found */ - brd->magic = DGNC_BOARD_MAGIC; brd->boardnum = dgnc_num_boards; brd->vendor = dgnc_pci_tbl[id].vendor; brd->device = dgnc_pci_tbl[id].device; @@ -444,7 +443,7 @@ static void dgnc_cleanup_board(struct dgnc_board *brd) { int i = 0; - if (!brd || brd->magic != DGNC_BOARD_MAGIC) + if (!brd) return; switch (brd->device) { |