projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c29308
)
ALSA: scarlett2: Return ENOSPC for out-of-bounds flash writes
author
Geoffrey D. Bennett
<g@b4.vu>
Fri, 4 Oct 2024 14:28:39 +0000
(23:58 +0930)
committer
Takashi Iwai
<tiwai@suse.de>
Tue, 8 Oct 2024 08:11:49 +0000
(10:11 +0200)
When writing to flash, return ENOSPC instead of EINVAL if the requested
write would exceed the size of the flash segment.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link:
https://patch.msgid.link/3a4af07b0329bed5ffb6994594e4f7bd202aad0f.1727971672.git.g@b4.vu
sound/usb/mixer_scarlett2.c
patch
|
blob
|
history
diff --git
a/sound/usb/mixer_scarlett2.c
b/sound/usb/mixer_scarlett2.c
index
aa7c3d7
..
844e95c
100644
(file)
--- a/
sound/usb/mixer_scarlett2.c
+++ b/
sound/usb/mixer_scarlett2.c
@@
-9516,7
+9516,7
@@
static long scarlett2_hwdep_write(struct snd_hwdep *hw,
SCARLETT2_FLASH_BLOCK_SIZE;
if (count < 0 || *offset < 0 || *offset + count >= flash_size)
- return -E
INVAL
;
+ return -E
NOSPC
;
if (!count)
return 0;