From: Wayne Porter Date: Tue, 11 Oct 2016 21:56:51 +0000 (+0000) Subject: staging: rts5208: rtsx.c: Alloc sizeof struct X-Git-Tag: v4.10-rc1~148^2~556 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2eb9d8cbb3c3d4458223d3399a2a53a922e37ce8;p=karo-tx-linux.git staging: rts5208: rtsx.c: Alloc sizeof struct Satisfy checkpatch message: Prefer kzalloc(sizeof(*dev->chip)...) over kzalloc(sizeof(struct rtsx_chip)...) Signed-off-by: Wayne Porter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index 809d37d243bd..dafd8fdca1ed 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -883,7 +883,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(struct rtsx_chip), GFP_KERNEL); + dev->chip = kzalloc(sizeof(dev->chip), GFP_KERNEL); if (!dev->chip) { err = -ENOMEM; goto errout;