[PATCH 3/8] imx-drm: ipu-dmfc: Remove unneeded 'dmfc' check
Russell King
rmk+kernel at arm.linux.org.uk
Wed Apr 9 05:55:04 PDT 2014
From: Fabio Estevam <fabio.estevam at freescale.com>
To: linux-arm-kernel at lists.infradead.org
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 at oracle.com>
Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
Signed-off-by: Fabio Estevam <festevam at gmail.com>
Acked-by: Philipp Zabel <p.zabel at pengutronix.de>
Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
---
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
More information about the linux-arm-kernel
mailing list