diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2011-03-13 21:58:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-14 12:22:54 -0700 |
commit | 819d4eb11605408e0267301d8853367ff82286a5 (patch) | |
tree | 753c9d8b841e90b4e1195d6d210ab14589e95d45 /drivers/staging | |
parent | 570edd3b2337a94b4159aa9ff10e0b96c5a69ec2 (diff) |
staging: ste_rmi4: fix memory leaks
Free resources before exit.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c index 51b4a79e4b83..d55a8e40318b 100644 --- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c @@ -764,8 +764,10 @@ static int synaptics_rmi4_i2c_query_device(struct synaptics_rmi4_data *pdata) (pdata, rfi, &rmi_fd, intr_count); - if (retval < 0) + if (retval < 0) { + kfree(rfi); return retval; + } } break; } |