From: Fabio Estevam <[email protected]>
To: [email protected]

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 <[email protected]>
Signed-off-by: Fabio Estevam <[email protected]>
Signed-off-by: Fabio Estevam <[email protected]>
Acked-by: Philipp Zabel <[email protected]>
Signed-off-by: Russell King <[email protected]>
---
 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 98070dd8c920..45213017fa4b 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.3.1

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to