Commit a1ceab8b authored by Simon Sandström's avatar Simon Sandström Committed by Greg Kroah-Hartman

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: default avatarSimon Sandström <simon@nikanor.nu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a12cae87
...@@ -317,7 +317,7 @@ static int kp2000_pcie_probe(struct pci_dev *pdev, ...@@ -317,7 +317,7 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
/* /*
* Step 1: Allocate a struct for the pcard * Step 1: Allocate a struct for the pcard
*/ */
pcard = kzalloc(sizeof(struct kp2000_device), GFP_KERNEL); pcard = kzalloc(sizeof(*pcard), GFP_KERNEL);
if (!pcard) if (!pcard)
return -ENOMEM; return -ENOMEM;
dev_dbg(&pdev->dev, "probe: allocated struct kp2000_device @ %p\n", dev_dbg(&pdev->dev, "probe: allocated struct kp2000_device @ %p\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment