From: Fabio Estevam Date: Fri, 28 Feb 2014 14:39:41 +0000 (-0300) Subject: imx-drm: ipu-dmfc: Remove unneeded 'dmfc' check X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b6d8115e4ef497fde9363a72716793399a1060c2;p=linux-beck.git imx-drm: ipu-dmfc: Remove unneeded 'dmfc' check 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 Signed-off-by: Fabio Estevam Signed-off-by: Fabio Estevam Acked-by: Philipp Zabel Signed-off-by: Greg Kroah-Hartman --- 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;