From: Seung-Woo Kim Date: Wed, 24 Jan 2024 07:33:03 +0000 (+0900) Subject: maru: eeprom: add missed unlock for EEPROM_SET_WP ioctl X-Git-Tag: accepted/tizen/unified/20240201.165108^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5c927c0a83160e513031c5d0504d2f856e34ca9;p=sdk%2Femulator%2Femulator-kernel.git maru: eeprom: add missed unlock for EEPROM_SET_WP ioctl There was missing unlock during EEPROM_SET_WP ioctl error path. Add the missed unlock. Change-Id: I87c01ab81532058ae93aee10349563e4bdf92b59 Signed-off-by: Seung-Woo Kim --- diff --git a/drivers/maru/tv/maru_eeprom.c b/drivers/maru/tv/maru_eeprom.c index c2e210dc4974..bee4a5e132e9 100644 --- a/drivers/maru/tv/maru_eeprom.c +++ b/drivers/maru/tv/maru_eeprom.c @@ -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;