Merge branch 'next' into for-linus
[linux-block.git] / drivers / input / touchscreen / raydium_i2c_ts.c
index b174642d523b350f2a955fef9c2b62d5deb9f2ee..d690a17240c2a285643c160e0405248f65239466 100644 (file)
@@ -210,12 +210,14 @@ static int raydium_i2c_send(struct i2c_client *client,
 
                error = raydium_i2c_xfer(client, addr, xfer, ARRAY_SIZE(xfer));
                if (likely(!error))
-                       return 0;
+                       goto out;
 
                msleep(RM_RETRY_DELAY_MS);
        } while (++tries < RM_MAX_RETRIES);
 
        dev_err(&client->dev, "%s failed: %d\n", __func__, error);
+out:
+       kfree(tx_buf);
        return error;
 }