Skip to content

Commit

Permalink
block, sx8: fix pointer math issue getting fw version
Browse files Browse the repository at this point in the history
"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 <[email protected]>
Cc: [email protected]
Acked-by: Jeff Garzik <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Dan Carpenter authored and axboe committed Mar 3, 2012
1 parent 62d3c54 commit ea5f4db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/sx8.c
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,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);
Expand Down

0 comments on commit ea5f4db

Please sign in to comment.