From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx> To: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxx> Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx> Signed-off-by: Fabio Estevam <festevam@xxxxxxxxx> Acked-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx> Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx> --- 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 devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel