aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ethernet/sun
diff options
context:
space:
mode:
authorAishwarya Ramakrishnan <aishwaryarj100@gmail.com>2020-04-19 21:14:43 +0530
committerDavid S. Miller <davem@davemloft.net>2020-04-20 12:21:21 -0700
commit5333fdbed0c860c7a17dc12f328203d29947eff7 (patch)
treeec0a0b5e8c8ce92e02b7e293e734002fe8e7af5a /drivers/net/ethernet/sun
parentnet: ethernet: dnet: convert to devm_platform_get_and_ioremap_resource (diff)
downloadwireguard-linux-5333fdbed0c860c7a17dc12f328203d29947eff7.tar.xz
wireguard-linux-5333fdbed0c860c7a17dc12f328203d29947eff7.zip
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: Aishwarya Ramakrishnan <aishwaryarj100@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sun')
-rw-r--r--drivers/net/ethernet/sun/cassini.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c
index e6d1aa882fa5..3ee6ab104cb9 100644
--- a/drivers/net/ethernet/sun/cassini.c
+++ b/drivers/net/ethernet/sun/cassini.c
@@ -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)
cas_saturn_firmware_init(cp);
- cp->init_block = (struct cas_init_block *)
+ cp->init_block =
pci_alloc_consistent(pdev, sizeof(struct cas_init_block),
&cp->block_dvma);
if (!cp->init_block) {