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>
This commit is contained in:
Simon Sandström 2019-06-04 00:29:15 +02:00 committed by Greg Kroah-Hartman
parent a12cae870a
commit a1ceab8b92
1 changed files with 1 additions and 1 deletions

View File

@ -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",