summaryrefslogtreecommitdiff
path: root/sound/isa/gus/gus_mem_proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/gus/gus_mem_proc.c')
-rw-r--r--sound/isa/gus/gus_mem_proc.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sound/isa/gus/gus_mem_proc.c b/sound/isa/gus/gus_mem_proc.c
index b2d2dba6c860..faa2bec8f6b6 100644
--- a/sound/isa/gus/gus_mem_proc.c
+++ b/sound/isa/gus/gus_mem_proc.c
@@ -36,20 +36,14 @@ static ssize_t snd_gf1_mem_proc_dump(struct snd_info_entry *entry,
struct file *file, char __user *buf,
size_t count, loff_t pos)
{
- long size;
struct gus_proc_private *priv = entry->private_data;
struct snd_gus_card *gus = priv->gus;
int err;
- size = count;
- if (pos + size > priv->size)
- size = (long)priv->size - pos;
- if (size > 0) {
- if ((err = snd_gus_dram_read(gus, buf, pos, size, priv->rom)) < 0)
- return err;
- return size;
- }
- return 0;
+ err = snd_gus_dram_read(gus, buf, pos, count, priv->rom);
+ if (err < 0)
+ return err;
+ return count;
}
static loff_t snd_gf1_mem_proc_llseek(struct snd_info_entry *entry,