TRATS2: S5C73M3: fix incorrect file pointer check tizen_2.2.1
authorHyungwon Hwang <human.hwang@samsung.com>
Wed, 30 Oct 2013 06:26:19 +0000 (15:26 +0900)
committerHyungwon Hwang <human.hwang@samsung.com>
Wed, 30 Oct 2013 06:47:58 +0000 (15:47 +0900)
If there is no firmware file, the file pointer which, otherwise
would be used as the file pointer to the firmware file, will
contain wrong file pointer.
Wrong file pointer can contain a value, not just NULL.

Change-Id: I316ff4e34680697dd72cdac644d867387daa9fba
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
drivers/media/video/slp_s5c73m3.c

index 70dcf87..e422b6d 100644 (file)
@@ -3626,7 +3626,7 @@ out:
        if (buf != NULL)
                vfree(buf);
 
-       if (fp !=  NULL)
+       if (!IS_ERR(fp))
                filp_close(fp, current->files);
 
        set_fs(old_fs);