From: Fabio Estevam <fabio.este...@freescale.com>

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.carpen...@oracle.com>
Signed-off-by: Fabio Estevam <fabio.este...@freescale.com>

Signed-off-by: Fabio Estevam <feste...@gmail.com>
---
Changes since v4:
- Remove the check instead of moving it earlier

 drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c 
b/drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c
index 98070dd..4521301 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c
+++ b/drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c
@@ -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;
-- 
1.8.1.2

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to