Commit 66615321 authored by Lior Dotan's avatar Lior Dotan Committed by Greg Kroah-Hartman

Staging: slicoss: use correct type for memory allcations

Fix sizeof to use the right type
Signed-off-by: default avatarLior Dotan <liodot@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7c7e1879
...@@ -323,7 +323,7 @@ static void slic_init_adapter(struct net_device *netdev, ...@@ -323,7 +323,7 @@ static void slic_init_adapter(struct net_device *netdev,
index, pslic_handle, adapter->pfree_slic_handles, pslic_handle->next);*/ index, pslic_handle, adapter->pfree_slic_handles, pslic_handle->next);*/
adapter->pshmem = (struct slic_shmem *) adapter->pshmem = (struct slic_shmem *)
pci_alloc_consistent(adapter->pcidev, pci_alloc_consistent(adapter->pcidev,
sizeof(struct slic_shmem *), sizeof(struct slic_shmem),
&adapter-> &adapter->
phys_shmem); phys_shmem);
/* /*
...@@ -1431,7 +1431,7 @@ static void slic_init_cleanup(struct adapter *adapter) ...@@ -1431,7 +1431,7 @@ static void slic_init_cleanup(struct adapter *adapter)
DBG_MSG("adapter[%p] port %d pshmem[%p] FreeShmem ", DBG_MSG("adapter[%p] port %d pshmem[%p] FreeShmem ",
adapter, adapter->port, (void *) adapter->pshmem); adapter, adapter->port, (void *) adapter->pshmem);
pci_free_consistent(adapter->pcidev, pci_free_consistent(adapter->pcidev,
sizeof(struct slic_shmem *), sizeof(struct slic_shmem),
adapter->pshmem, adapter->phys_shmem); adapter->pshmem, adapter->phys_shmem);
adapter->pshmem = NULL; adapter->pshmem = NULL;
adapter->phys_shmem = (dma_addr_t) NULL; adapter->phys_shmem = (dma_addr_t) NULL;
...@@ -2832,7 +2832,7 @@ static u32 slic_card_locate(struct adapter *adapter) ...@@ -2832,7 +2832,7 @@ static u32 slic_card_locate(struct adapter *adapter)
} }
if (!physcard) { if (!physcard) {
/* no structure allocated for this physical card yet */ /* no structure allocated for this physical card yet */
physcard = kzalloc(sizeof(struct physcard *), GFP_ATOMIC); physcard = kzalloc(sizeof(struct physcard), GFP_ATOMIC);
ASSERT(physcard); ASSERT(physcard);
DBG_MSG DBG_MSG
......
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