habanalabs: clear vm_pgoff before doing the mmap
authorOded Gabbay <oded.gabbay@gmail.com>
Sat, 29 Aug 2020 08:55:15 +0000 (11:55 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Tue, 22 Sep 2020 15:49:51 +0000 (18:49 +0300)
commitc5e0ec66f01d6621a64837428efcbbe731d90cd5
tree7c3fd221a9cfd20789584e3c5401b9530546b497
parent3174ac9bb1045946ff563aa01d679809e87fb2db
habanalabs: clear vm_pgoff before doing the mmap

The driver use vm_pgoff to hold the CB idr handle. Before we actually call
the mapping function, we need to clear the handle so there won't be any
garbage left in vm_pgoff.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/common/command_buffer.c