lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 4 Jun 2019 00:29:15 +0200 From: Simon Sandström <simon@...anor.nu> To: gregkh@...uxfoundation.org Cc: simon@...anor.nu, jeremy@...zel.net, devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org Subject: [PATCH 6/7] 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@...anor.nu> --- drivers/staging/kpc2000/kpc2000/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", -- 2.20.1
Powered by blists - more mailing lists