[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20170313175512.18756-1-colin.king@canonical.com>
Date: Mon, 13 Mar 2017 17:55:12 +0000
From: Colin King <colin.king@...onical.com>
To: Mauro Carvalho Chehab <mchehab@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Alan Cox <alan@...ux.intel.com>, linux-media@...r.kernel.org,
devel@...verdev.osuosl.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] staging/atomisp: remove redundant null check on frame
From: Colin Ian King <colin.king@...onical.com>
There is no need to perform a null check on frame as there is an earlier
null check check and return hence making the null check redundant.
Remove it.
Detected by CoverityScan, CID#1416563 ("Logically Dead Code")
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
.../media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c
index 25e9d88..604bde6 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c
@@ -159,8 +159,7 @@ enum ia_css_err ia_css_frame_allocate(struct ia_css_frame **frame,
#ifndef ISP2401
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_allocate() leave: frame=%p\n",
- frame ? *frame : (void *)-1);
+ "ia_css_frame_allocate() leave: frame=%p\n", *frame);
#else
if ((*frame != NULL) && err == IA_CSS_SUCCESS)
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
--
2.10.2
Powered by blists - more mailing lists