Input: synaptics-rmi4 - fix an unchecked out of memory error path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 6 Apr 2018 22:36:11 +0000 (15:36 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 6 Apr 2018 22:39:18 +0000 (15:39 -0700)
commit839c42273617787318da7baf6151d553108f5e17
treecf916a04b3632b742374f3f19c6222d6856848d6
parent664b0bae0b87f69bc9deb098f5e0158b9cf18e04
Input: synaptics-rmi4 - fix an unchecked out of memory error path

When extending the rmi_spi buffers, we must check that no out of memory
error occurs, otherwise we may access data above the currently allocated
memory.

Propagate the error code returned by 'rmi_spi_manage_pools()' instead.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Andrew Duggan <aduggan@synaptics.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/rmi4/rmi_spi.c