Commit d2b805d8 authored by Wei Yongjun's avatar Wei Yongjun Committed by Jens Axboe

cciss: fix invalid use of sizeof in cciss_find_cfgtables()

sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: scameron@beardog.cce.hp.com
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 8761a3dc
...@@ -4206,7 +4206,7 @@ static int cciss_find_cfgtables(ctlr_info_t *h) ...@@ -4206,7 +4206,7 @@ static int cciss_find_cfgtables(ctlr_info_t *h)
if (rc) if (rc)
return rc; return rc;
h->cfgtable = remap_pci_mem(pci_resource_start(h->pdev, h->cfgtable = remap_pci_mem(pci_resource_start(h->pdev,
cfg_base_addr_index) + cfg_offset, sizeof(h->cfgtable)); cfg_base_addr_index) + cfg_offset, sizeof(*h->cfgtable));
if (!h->cfgtable) if (!h->cfgtable)
return -ENOMEM; return -ENOMEM;
rc = write_driver_ver_to_cfgtable(h->cfgtable); rc = write_driver_ver_to_cfgtable(h->cfgtable);
......
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