Commit e80d8afc authored by Todd Poynor's avatar Todd Poynor Committed by Greg Kroah-Hartman
Browse files

staging: gasket: gasket_mmap return error instead of valid BAR index



When offset to be mapped matches both a BAR region and a coherent mapped
region return an error as intended, not the BAR index.

Signed-off-by: default avatarSimon Que <sque@chromium.org>
Signed-off-by: default avatarTodd Poynor <toddpoynor@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ec45f016
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1627,7 +1627,7 @@ static int gasket_mmap(struct file *filp, struct vm_area_struct *vma)
			"0x%lx",
			raw_offset);
		trace_gasket_mmap_exit(bar_index);
		return bar_index;
		return -EINVAL;
	}

	vma->vm_private_data = gasket_dev;