summaryrefslogtreecommitdiff
path: root/drivers/block/cciss.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-03-22 19:11:00 +0400
committerJens Axboe <axboe@kernel.dk>2013-03-22 22:22:49 +0400
commitd2b805d89510737ea80c1469f854a16480d19778 (patch)
treeeb57b56059cab773ff762e409abbb60da1eaa0ac /drivers/block/cciss.c
parent8761a3dc1f07b163414e2215a2cadbb4cfe2a107 (diff)
downloadlinux-d2b805d89510737ea80c1469f854a16480d19778.tar.xz
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: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: scameron@beardog.cce.hp.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r--drivers/block/cciss.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index ade58bc8f3c4..1c1b8e544aa2 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -4206,7 +4206,7 @@ static int cciss_find_cfgtables(ctlr_info_t *h)
if (rc)
return rc;
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)
return -ENOMEM;
rc = write_driver_ver_to_cfgtable(h->cfgtable);