media: s5p-mfc: Remove firmware buf null check in s5p_mfc_load_firmware()
authorShuah Khan <shuahkh@osg.samsung.com>
Sat, 4 Nov 2017 02:01:57 +0000 (22:01 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 18 Dec 2017 20:10:33 +0000 (15:10 -0500)
s5p_mfc_load_firmware() will not get called if fw_buf.virt allocation
fails. The allocation happens very early on in the probe routine and
probe fails if allocation fails.

There is no need to check if it is null in s5p_mfc_load_firmware().
Remove the check.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c

index 69ef9c23a99aed111ec7632b8c5cecd194188ec6..46c9d67b78e49f2ab659f40a538bd13b1c60b058 100644 (file)
@@ -75,11 +75,6 @@ int s5p_mfc_load_firmware(struct s5p_mfc_dev *dev)
                release_firmware(fw_blob);
                return -ENOMEM;
        }
-       if (!dev->fw_buf.virt) {
-               mfc_err("MFC firmware is not allocated\n");
-               release_firmware(fw_blob);
-               return -EINVAL;
-       }
        memcpy(dev->fw_buf.virt, fw_blob->data, fw_blob->size);
        wmb();
        release_firmware(fw_blob);