diff options
| author | 2019-06-04 00:29:15 +0200 | |
|---|---|---|
| committer | 2019-06-06 14:57:01 +0200 | |
| commit | a1ceab8b925199fd30ca777215957f374d3366a5 (patch) | |
| tree | 89afbb6b44b99f94fb8a8888a3294ce8174edcc4 | |
| parent | staging: kpc2000: remove unnecessary include in core.c (diff) | |
staging: kpc2000: use sizeof(var) in kzalloc call
Fixes checkpatch.pl warning "Prefer kzalloc(sizeof(*pcard)...) over
kzalloc(sizeof(struct kp2000_device)...)".
Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/kpc2000/kpc2000/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c index 3f17566a9d03..2d8d188624f7 100644 --- a/drivers/staging/kpc2000/kpc2000/core.c +++ b/drivers/staging/kpc2000/kpc2000/core.c @@ -317,7 +317,7 @@ static int kp2000_pcie_probe(struct pci_dev *pdev, /* * Step 1: Allocate a struct for the pcard */ - pcard = kzalloc(sizeof(struct kp2000_device), GFP_KERNEL); + pcard = kzalloc(sizeof(*pcard), GFP_KERNEL); if (!pcard) return -ENOMEM; dev_dbg(&pdev->dev, "probe: allocated struct kp2000_device @ %p\n", |
