Commit 5333fdbe authored by Aishwarya Ramakrishnan's avatar Aishwarya Ramakrishnan Committed by David S. Miller

net: sun: Remove unneeded cast from memory allocation

Remove casting the values returned by memory allocation function.

Coccinelle emits WARNING: casting value returned by memory allocation
function to (struct cas_init_block *) is useless.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarAishwarya Ramakrishnan <aishwaryarj100@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 92efe48e
...@@ -5059,7 +5059,7 @@ static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -5059,7 +5059,7 @@ static int cas_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (cp->cas_flags & CAS_FLAG_SATURN) if (cp->cas_flags & CAS_FLAG_SATURN)
cas_saturn_firmware_init(cp); cas_saturn_firmware_init(cp);
cp->init_block = (struct cas_init_block *) cp->init_block =
pci_alloc_consistent(pdev, sizeof(struct cas_init_block), pci_alloc_consistent(pdev, sizeof(struct cas_init_block),
&cp->block_dvma); &cp->block_dvma);
if (!cp->init_block) { if (!cp->init_block) {
......
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