From: Colin Ian King Date: Mon, 13 Mar 2017 17:55:12 +0000 (+0000) Subject: staging/atomisp: remove redundant null check on frame X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=03028868eb195dad2ab69f81776779b91c3f9a42;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging/atomisp: remove redundant null check on frame 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 Signed-off-by: Greg Kroah-Hartman --- 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 25e9d88dc930..604bde63f232 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,