diff options
author | Lidza Louina | 2013-10-04 18:18:30 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2013-10-06 02:52:58 +0200 |
commit | a07bf39a65cb5eb4e38426afc7d5e00d560211da (patch) | |
tree | 3f0cc0e7031574a2097f32a23372232ea44d68cf /drivers/staging/dgnc/dgnc_driver.c | |
parent | staging: comedi: ni_6527: change MODULE_DESCRIPTION (diff) | |
download | kernel-qcow2-linux-a07bf39a65cb5eb4e38426afc7d5e00d560211da.tar.gz kernel-qcow2-linux-a07bf39a65cb5eb4e38426afc7d5e00d560211da.tar.xz kernel-qcow2-linux-a07bf39a65cb5eb4e38426afc7d5e00d560211da.zip |
staging: dgnc: changes arguments in sizeof
The arguments that were passed into sizeof were
generic. This patch changes this by putting
the actual item that we need a size of instead.
For example:
- kzalloc(sizeof(struct dgnc_board), GFP_KERNEL);
+ kzalloc(sizeof(*brd), GFP_KERNEL);
Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index c398193e9b85..4271fa38a46c 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -487,7 +487,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id) /* get the board structure and prep it */ brd = dgnc_Board[dgnc_NumBoards] = - kzalloc(sizeof(struct dgnc_board), GFP_KERNEL); + kzalloc(sizeof(*brd), GFP_KERNEL); if (!brd) { APR(("memory allocation for board structure failed\n")); return -ENOMEM; @@ -495,7 +495,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id) /* make a temporary message buffer for the boot messages */ brd->msgbuf = brd->msgbuf_head = - kzalloc(sizeof(char) * 8192, GFP_KERNEL); + kzalloc(sizeof(u8) * 8192, GFP_KERNEL); if (!brd->msgbuf) { kfree(brd); APR(("memory allocation for board msgbuf failed\n")); |