imx-drm: ipu-dmfc: Remove unneeded 'dmfc' check
authorFabio Estevam <fabio.estevam@freescale.com>
Fri, 28 Feb 2014 14:39:41 +0000 (11:39 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Feb 2014 22:56:33 +0000 (14:56 -0800)
Fix the following static checker warning:

drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c:164 ipu_dmfc_setup_channel() warn: variable dereferenced before check 'dmfc' (see line 157)

As 'dmfc' could never be null, there is no need to do such check.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c

index 98070dd8c92057c85b6a9aea1b9236fbb504b89f..45213017fa4b3557e680843f05fad4adf4b19227 100644 (file)
@@ -161,9 +161,6 @@ static int ipu_dmfc_setup_channel(struct dmfc_channel *dmfc, int slots,
                        "dmfc: using %d slots starting from segment %d for IPU channel %d\n",
                        slots, segment, dmfc->data->ipu_channel);
 
-       if (!dmfc)
-               return -EINVAL;
-
        switch (slots) {
        case 1:
                field = DMFC_FIFO_SIZE_64;