diff options
author | Simon Sandström <simon@nikanor.nu> | 2019-05-23 15:51:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-24 10:02:38 +0300 |
commit | 77290d4b7c0d78f73e6af047344f43b01c176321 (patch) | |
tree | 168986154ed24f6fb13372810e3be59b8a5d5413 | |
parent | 42143af99d2b8d880c7523a491e5e166e4cfd800 (diff) | |
download | linux-77290d4b7c0d78f73e6af047344f43b01c176321.tar.xz |
staging: kpc2000: use kzalloc(sizeof(var)...) in cell_probe.c
Fixes checkpatch.pl warning "Prefer kzalloc(sizeof(*kudev)...) over
kzalloc(sizeof(struct kpc_uio_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/cell_probe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c index f8d19e693f21..caf48256aa2e 100644 --- a/drivers/staging/kpc2000/kpc2000/cell_probe.c +++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c @@ -292,7 +292,7 @@ static int probe_core_uio(unsigned int core_num, struct kp2000_device *pcard, dev_dbg(&pcard->pdev->dev, "Found UIO core: type = %02d dma = %02x / %02x offset = 0x%x length = 0x%x (%d regs)\n", cte.type, KPC_OLD_S2C_DMA_CH_NUM(cte), KPC_OLD_C2S_DMA_CH_NUM(cte), cte.offset, cte.length, cte.length / 8); - kudev = kzalloc(sizeof(struct kpc_uio_device), GFP_KERNEL); + kudev = kzalloc(sizeof(*kudev), GFP_KERNEL); if (!kudev) { dev_err(&pcard->pdev->dev, "probe_core_uio: failed to kzalloc kpc_uio_device\n"); return -ENOMEM; |