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>
Wed, 14 Dec 2016 04:48:40 +0000 (13:48 +0900)
commit7bb97b93f206308fe84f457eee98929908474da2
tree1bc4195ac4f1441032f8550e27c9629743a17858
parent1faa724f021d73517063d4aa5cf3ee7d76e8c001
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().

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