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, 4 Apr 2016 01:12:33 +0000 (10:12 +0900)
commit071adc09929f7092a0f3ce3551a17f6a38a40fb8
tree9bd937e583797f03fa079868feb3f78eb9f5a851
parent21da24ee6582931a7d54e49927fe4a0824ed4d89
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