aboutsummaryrefslogtreecommitdiff
path: root/drivers/block/sx8.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-03-03 12:09:17 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-19 09:02:34 -0700
commit565cd5393782f3100ea060ec609bec84ddea9326 (patch)
tree93816168d89753dae7611cf5c04b3517d14ab010 /drivers/block/sx8.c
parent195b1c3447ea79c7e453aaf62b6e7df49fdba8f8 (diff)
block, sx8: fix pointer math issue getting fw version
commit ea5f4db8ece896c2ab9eafa0924148a2596c52e4 upstream. "mem" is type u8. We need parenthesis here or it screws up the pointer math probably leading to an oops. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/block/sx8.c')
-rw-r--r--drivers/block/sx8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index b70f0fca9a4..eec7b7a43cb 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -1116,7 +1116,7 @@ static inline void carm_handle_resp(struct carm_host *host,
break;
case MISC_GET_FW_VER: {
struct carm_fw_ver *ver = (struct carm_fw_ver *)
- mem + sizeof(struct carm_msg_get_fw_ver);
+ (mem + sizeof(struct carm_msg_get_fw_ver));
if (!error) {
host->fw_ver = le32_to_cpu(ver->version);
host->flags |= (ver->features & FL_FW_VER_MASK);