]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/input/rmi4/rmi_smbus.c
Input: goldfish_events - replace zero-length array with flexible-array member
[linux.git] / drivers / input / rmi4 / rmi_smbus.c
index b313c579914f49948e0c3e97f0865ec178b459ca..2407ea43de59b7b5f386d0361c3cc49495df62d3 100644 (file)
@@ -163,6 +163,7 @@ static int rmi_smb_write_block(struct rmi_transport_dev *xport, u16 rmiaddr,
                /* prepare to write next block of bytes */
                cur_len -= SMB_MAX_COUNT;
                databuff += SMB_MAX_COUNT;
+               rmiaddr += SMB_MAX_COUNT;
        }
 exit:
        mutex_unlock(&rmi_smb->page_mutex);
@@ -214,6 +215,7 @@ static int rmi_smb_read_block(struct rmi_transport_dev *xport, u16 rmiaddr,
                /* prepare to read next block of bytes */
                cur_len -= SMB_MAX_COUNT;
                databuff += SMB_MAX_COUNT;
+               rmiaddr += SMB_MAX_COUNT;
        }
 
        retval = 0;