ACPI: APEI: Remove redundant assignments in erst_dbg_{ioctl|write}()
authorThorsten Blum <thorsten.blum@linux.dev>
Wed, 3 Sep 2025 22:49:11 +0000 (00:49 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 15 Sep 2025 19:21:57 +0000 (21:21 +0200)
commite06722a9df14eff39f42059f84063daa0a95b92c
treec2814e77276d3eaded9783531148c43e103b0a3c
parentf83ec76bf285bea5727f478a68b894f5543ca76e
ACPI: APEI: Remove redundant assignments in erst_dbg_{ioctl|write}()

Use the result of copy_from_user() directly instead of assigning it to
the local variable 'rc' and then overwriting it in erst_dbg_write() or
immediately returning from erst_dbg_ioctl().

No intentional functional changes.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Link: https://patch.msgid.link/20250903224913.242928-2-thorsten.blum@linux.dev
[ rjw: Changelog edit ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/apei/erst-dbg.c