Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76098b36 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by Greg Kroah-Hartman
Browse files

firmware: send -EINTR on signal abort on fallback mechanism



Right now we send -EAGAIN to a syfs write which got interrupted.
Userspace can't tell what happened though, send -EINTR if we
were killed due to a signal so userspace can tell things apart.

This is only applicable to the fallback mechanism.

Reported-by: default avatarMartin Fuzzey <mfuzzey@parkeon.com>
Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0d1f417e
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1089,9 +1089,12 @@ static int _request_firmware_load(struct firmware_priv *fw_priv,
		mutex_unlock(&fw_lock);
	}

	if (fw_state_is_aborted(&buf->fw_st))
	if (fw_state_is_aborted(&buf->fw_st)) {
		if (retval == -ERESTARTSYS)
			retval = -EINTR;
		else
			retval = -EAGAIN;
	else if (buf->is_paged_buf && !buf->data)
	} else if (buf->is_paged_buf && !buf->data)
		retval = -ENOMEM;

	device_del(f_dev);