Commit 2eb9d8cb authored by Wayne Porter's avatar Wayne Porter Committed by Greg Kroah-Hartman

staging: rts5208: rtsx.c: Alloc sizeof struct

Satisfy checkpatch message:  Prefer kzalloc(sizeof(*dev->chip)...) over
kzalloc(sizeof(struct rtsx_chip)...)
Signed-off-by: default avatarWayne Porter <wporter82@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8149b9ab
...@@ -883,7 +883,7 @@ static int rtsx_probe(struct pci_dev *pci, ...@@ -883,7 +883,7 @@ static int rtsx_probe(struct pci_dev *pci,
dev = host_to_rtsx(host); dev = host_to_rtsx(host);
memset(dev, 0, sizeof(struct rtsx_dev)); 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) { if (!dev->chip) {
err = -ENOMEM; err = -ENOMEM;
goto errout; goto errout;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment