Loading drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.c +8 −4 Original line number Diff line number Diff line Loading @@ -3588,10 +3588,11 @@ static int synaptics_rmi4_probe(struct platform_device *pdev) rmi4_data->fingers_on_2d = false; rmi4_data->update_coords = true; rmi4_data->write_buf = devm_kzalloc(&pdev->dev, I2C_WRITE_BUF_MAX_LEN, GFP_KERNEL); if (!rmi4_data->write_buf) return -ENOMEM; rmi4_data->write_buf = kzalloc(I2C_WRITE_BUF_MAX_LEN, GFP_KERNEL); if (!rmi4_data->write_buf) { retval = -ENOMEM; goto err_write_buf_alloc; } rmi4_data->write_buf_len = I2C_WRITE_BUF_MAX_LEN; rmi4_data->irq_enable = synaptics_rmi4_irq_enable; Loading Loading @@ -3811,6 +3812,8 @@ err_regulator_enable: regulator_put(rmi4_data->regulator_vdd); regulator_put(rmi4_data->regulator_avdd); err_regulator_configure: kfree(rmi4_data->write_buf); err_write_buf_alloc: kfree(rmi4_data); return retval; Loading Loading @@ -3905,6 +3908,7 @@ static int synaptics_rmi4_remove(struct platform_device *pdev) regulator_put(rmi4_data->regulator_avdd); } kfree(rmi4_data->write_buf); kfree(rmi4_data); return 0; Loading drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_i2c.c +2 −3 Original line number Diff line number Diff line Loading @@ -148,9 +148,8 @@ static int synaptics_rmi4_i2c_write(struct synaptics_rmi4_data *rmi4_data, * Reassign memory for write_buf in case length is greater than 32 bytes */ if (rmi4_data->write_buf_len < length + 1) { devm_kfree(rmi4_data->pdev->dev.parent, rmi4_data->write_buf); rmi4_data->write_buf = devm_kzalloc(rmi4_data->pdev->dev.parent, length + 1, GFP_KERNEL); kfree(rmi4_data->write_buf); rmi4_data->write_buf = kzalloc(length + 1, GFP_KERNEL); if (!rmi4_data->write_buf) { rmi4_data->write_buf_len = 0; retval = -ENOMEM; Loading Loading
drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.c +8 −4 Original line number Diff line number Diff line Loading @@ -3588,10 +3588,11 @@ static int synaptics_rmi4_probe(struct platform_device *pdev) rmi4_data->fingers_on_2d = false; rmi4_data->update_coords = true; rmi4_data->write_buf = devm_kzalloc(&pdev->dev, I2C_WRITE_BUF_MAX_LEN, GFP_KERNEL); if (!rmi4_data->write_buf) return -ENOMEM; rmi4_data->write_buf = kzalloc(I2C_WRITE_BUF_MAX_LEN, GFP_KERNEL); if (!rmi4_data->write_buf) { retval = -ENOMEM; goto err_write_buf_alloc; } rmi4_data->write_buf_len = I2C_WRITE_BUF_MAX_LEN; rmi4_data->irq_enable = synaptics_rmi4_irq_enable; Loading Loading @@ -3811,6 +3812,8 @@ err_regulator_enable: regulator_put(rmi4_data->regulator_vdd); regulator_put(rmi4_data->regulator_avdd); err_regulator_configure: kfree(rmi4_data->write_buf); err_write_buf_alloc: kfree(rmi4_data); return retval; Loading Loading @@ -3905,6 +3908,7 @@ static int synaptics_rmi4_remove(struct platform_device *pdev) regulator_put(rmi4_data->regulator_avdd); } kfree(rmi4_data->write_buf); kfree(rmi4_data); return 0; Loading
drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_i2c.c +2 −3 Original line number Diff line number Diff line Loading @@ -148,9 +148,8 @@ static int synaptics_rmi4_i2c_write(struct synaptics_rmi4_data *rmi4_data, * Reassign memory for write_buf in case length is greater than 32 bytes */ if (rmi4_data->write_buf_len < length + 1) { devm_kfree(rmi4_data->pdev->dev.parent, rmi4_data->write_buf); rmi4_data->write_buf = devm_kzalloc(rmi4_data->pdev->dev.parent, length + 1, GFP_KERNEL); kfree(rmi4_data->write_buf); rmi4_data->write_buf = kzalloc(length + 1, GFP_KERNEL); if (!rmi4_data->write_buf) { rmi4_data->write_buf_len = 0; retval = -ENOMEM; Loading