summaryrefslogtreecommitdiff
path: root/drivers/staging/rts5208
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2016-10-17 23:35:49 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-25 09:59:48 +0200
commitef5aa934cf031ef9525b29e35c5d381698d55ca5 (patch)
treec9df5e2757799fbbf9c36fa5d24cdfd65b2a3d50 /drivers/staging/rts5208
parentd298ec65803b48a764ae9ccf2ed2238669a4d02b (diff)
staging: rts5208: rtsx.c: Fix invalid use of sizeof in rtsx_probe()
sizeof() when applied to a pointer typed expression gives the size of the pointer, not that of the pointed data. Fixes: 2eb9d8cbb3c3 ("staging: rts5208: rtsx.c: Alloc sizeof struct") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rts5208')
-rw-r--r--drivers/staging/rts5208/rtsx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c
index f3e5efdf0ffc..68d75d0d5efd 100644
--- a/drivers/staging/rts5208/rtsx.c
+++ b/drivers/staging/rts5208/rtsx.c
@@ -884,7 +884,7 @@ static int rtsx_probe(struct pci_dev *pci,
dev = host_to_rtsx(host);
memset(dev, 0, sizeof(struct rtsx_dev));
- dev->chip = kzalloc(sizeof(dev->chip), GFP_KERNEL);
+ dev->chip = kzalloc(sizeof(*dev->chip), GFP_KERNEL);
if (!dev->chip) {
err = -ENOMEM;
goto errout;