maru: eeprom: add missed unlock for EEPROM_SET_WP ioctl 41/304841/1 accepted/tizen/unified/20240201.165108
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 24 Jan 2024 07:33:03 +0000 (16:33 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 24 Jan 2024 07:33:03 +0000 (16:33 +0900)
There was missing unlock during EEPROM_SET_WP ioctl error path.
Add the missed unlock.

Change-Id: I87c01ab81532058ae93aee10349563e4bdf92b59
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/maru/tv/maru_eeprom.c

index c2e210d..bee4a5e 100644 (file)
@@ -555,7 +555,8 @@ long eep_ioctl(struct file *fp, unsigned int cmd, unsigned long args)
        case EEPROM_SET_WP:
                if (copy_from_user(&protect, (int *)args, sizeof(int))) {
                        eep_warn("failed copy_from_user.\n");
-                       return -EFAULT;
+                       ret = -EFAULT;
+                       goto out_unlock;
                }
                eep_set_wp(protect);
                break;