media: rcar-vin: fix null pointer dereference in rvin_group_get()
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tue, 24 Apr 2018 23:45:06 +0000 (19:45 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Sat, 5 May 2018 14:27:15 +0000 (10:27 -0400)
commit16cedd99c64cc9f128a3e9bb0613980833b7f938
treedf153d984752534f44db356ed38b006633081066
parentec2b0d04631748a799ded5f15926846c712062cb
media: rcar-vin: fix null pointer dereference in rvin_group_get()

Store the group pointer before disassociating the VIN from the group.

Fixes: 3bb4c3bc85bf77a7 ("media: rcar-vin: add group allocator functions")

Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/rcar-vin/rcar-core.c