staging: ion: Fix error handling in ion_buffer_create
authorRohit kumar <rohit.kr@samsung.com>
Wed, 30 Sep 2015 05:37:35 +0000 (11:07 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Oct 2015 09:42:03 +0000 (11:42 +0200)
commita56d092aa94ebcc9452ddaa47423b9a478aa6aa5
tree94f83b532a831b80fc214edfcdc23b60755c128d
parentbc719854d2c0f338fb784560e80e216dcfbe5332
staging: ion: Fix error handling in ion_buffer_create

This patch fixes error handling case when buffer->pages allocation
fails. Also, it removes unreachable code of checking ret variable
although it is not updated.

Signed-off-by: Rohit kumar <rohit.kr@samsung.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Suggested-by: Pintu Kumar <pintu.k@samsung.com>
Reviewed-by: Pintu Kumar <pintu.k@samsung.com>
Reviewed-by: Gioh Kim <gioh.kim@lge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion.c