1
0
Fork 0

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 <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
Wayne Porter 2016-10-11 21:56:51 +00:00 committed by Greg Kroah-Hartman
parent 8149b9ab57
commit 2eb9d8cbb3
1 changed files with 1 additions and 1 deletions

View File

@ -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;