Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[muen/linux.git] / drivers / input / rmi4 / rmi_f54.c
index 98a935efec8e2d4254691700bba27154c874e2b9..a6f515bcab2228a8783f10dbf10fae30462fd852 100644 (file)
@@ -680,7 +680,7 @@ static int rmi_f54_probe(struct rmi_function *fn)
        rx = f54->num_rx_electrodes;
        tx = f54->num_tx_electrodes;
        f54->report_data = devm_kzalloc(&fn->dev,
-                                       sizeof(u16) * tx * rx,
+                                       array3_size(tx, rx, sizeof(u16)),
                                        GFP_KERNEL);
        if (f54->report_data == NULL)
                return -ENOMEM;