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>
This commit is contained in:
Alexander Beregalov 2011-03-13 21:58:50 +03:00 committed by Greg Kroah-Hartman
parent 570edd3b23
commit 819d4eb116
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}