[media] siano: Remove redundant NULL check before kfree
authorSyam Sidhardhan <syamsidhardh@gmail.com>
Tue, 26 Feb 2013 18:24:56 +0000 (15:24 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 18 Mar 2013 20:03:41 +0000 (17:03 -0300)
kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/common/siano/smscoreapi.c

index 1842e64e63383c0a87bb0b557d3a0fd7fad0250e..9565dcc8381fd9369d2367fd365a1dde73ae510b 100644 (file)
@@ -719,8 +719,7 @@ void smscore_unregister_device(struct smscore_device_t *coredev)
                dma_free_coherent(NULL, coredev->common_buffer_size,
                        coredev->common_buffer, coredev->common_buffer_phys);
 
-       if (coredev->fw_buf != NULL)
-               kfree(coredev->fw_buf);
+       kfree(coredev->fw_buf);
 
        list_del(&coredev->entry);
        kfree(coredev);