From: Himanshu Jha Date: Sat, 26 Aug 2017 20:51:49 +0000 (-0400) Subject: media: atomisp2: Remove null check before kfree X-Git-Tag: v4.15-rc1~91^2~303 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=727d38a89179fb052b946c59860f86353b9daeb5;p=thirdparty%2Fkernel%2Flinux.git media: atomisp2: Remove null check before kfree Kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c index 63582161050a3..451c76e7eec0b 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c @@ -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; }