]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: atomisp2: Remove null check before kfree
authorHimanshu Jha <himanshujha199640@gmail.com>
Sat, 26 Aug 2017 20:51:49 +0000 (16:51 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sat, 23 Sep 2017 19:01:10 +0000 (15:01 -0400)
Kfree on NULL pointer is a no-op and therefore checking is redundant.

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c

index 63582161050a33e239fe11163f60262c8d29963e..451c76e7eec0b4c075129e1b8477e36efc2fe0be 100644 (file)
@@ -295,10 +295,8 @@ void sh_css_unload_firmware(void)
        }
 
        memset(&sh_css_sp_fw, 0, sizeof(sh_css_sp_fw));
-       if (sh_css_blob_info) {
-               kfree(sh_css_blob_info);
-               sh_css_blob_info = NULL;
-       }
+       kfree(sh_css_blob_info);
+       sh_css_blob_info = NULL;
        sh_css_num_binaries = 0;
 }