]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ast: Fix incorrect free on ioregs
authorSam Bobroff <sbobroff@linux.ibm.com>
Mon, 5 Nov 2018 05:57:47 +0000 (16:57 +1100)
committerDave Airlie <airlied@redhat.com>
Wed, 28 Nov 2018 23:41:11 +0000 (09:41 +1000)
commit4dcd4cd8344f5c82554ee7bea18fa67cb39bbd60
tree2aa17449e91b2af2a7ea762460b6f8dfc17eba5a
parentc1cd78c0e0fca39e5e5c6c6ccb3b1437a1beeacd
drm/ast: Fix incorrect free on ioregs

If the platform has no IO space, ioregs is placed next to the already
allocated regs. In this case, it should not be separately freed.

This prevents a kernel warning from __vunmap "Trying to vfree()
nonexistent vm area" when unloading the driver.

Fixes: 26f50eb7753b ("drm/ast: Try to use MMIO registers when PIO isn't supported")
Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ast/ast_main.c