]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging/atomisp: remove redundant null check on frame
authorColin Ian King <colin.king@canonical.com>
Mon, 13 Mar 2017 17:55:12 +0000 (17:55 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Mar 2017 00:00:37 +0000 (08:00 +0800)
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@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/frame/src/frame.c

index 25e9d88dc9300453a5660598c24acd58c162b40b..604bde63f2325cf9c03a100cc4631048935e9ab8 100644 (file)
@@ -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,