mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
char: powernv-op-panel: remove unnecessary reset of position pointer
The position pointer is only advanced if the return value of the write operation is positive at ksys_write(). Therefore no need to manually reset it when doing error handling. Assisted-by: coccinelle # to find it Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de> Link: https://patch.msgid.link/20260717094519.20656-1-fmancera@suse.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3c0cf801ea
commit
de1dea6fad
|
|
@ -89,7 +89,6 @@ static int __op_panel_update_display(void)
|
|||
static ssize_t oppanel_write(struct file *filp, const char __user *userbuf,
|
||||
size_t len, loff_t *f_pos)
|
||||
{
|
||||
loff_t f_pos_prev = *f_pos;
|
||||
ssize_t ret;
|
||||
int rc;
|
||||
|
||||
|
|
@ -105,7 +104,6 @@ static ssize_t oppanel_write(struct file *filp, const char __user *userbuf,
|
|||
if (rc != OPAL_SUCCESS) {
|
||||
pr_err_ratelimited("OPAL call failed to write to op panel display [rc=%d]\n",
|
||||
rc);
|
||||
*f_pos = f_pos_prev;
|
||||
return -EIO;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user