kdbus: connection: fix handling of failed fget()
authorDaniel Mack <daniel@zonque.org>
Tue, 17 Mar 2015 18:48:24 +0000 (19:48 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 29 Jun 2015 10:50:38 +0000 (19:50 +0900)
commit881ceb5c2d4bc3df3213d939d36d53720f4ddfdd
tree5c4a33760795a08fcb53da66b044a2280ce0eadc
parenta22e3a721e08963c44e73fd6dab29b30c7f3872e
kdbus: connection: fix handling of failed fget()

The patch 5fc8dd5c84fc: "kdbus: add connection, queue handling and
message validation code" from Sep 11, 2014, leads to the following
static checker warning:

ipc/kdbus/connection.c:2000 kdbus_cmd_send()
warn: 'cancel_fd' isn't an ERR_PTR

Fix this by checking for NULL pointers returned from fget().

Change-Id: Ibedba0331153b41ef535b79154ef5432e4bf0409
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paul Osmialowski <p.osmialowsk@samsung.com>
ipc/kdbus/connection.c