fpga: region: check for child regions before allocing image info
authorAlan Tull <atull@kernel.org>
Wed, 15 Nov 2017 20:20:17 +0000 (14:20 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2017 15:30:37 +0000 (16:30 +0100)
commit1743df83ae5a949037eb86a12f225abd4374d176
treee06029a4151af58235388fabe2a197d7fa6b3cd7
parent1df2dd7f587107ebf3c8e3733410627cf5c3b3ec
fpga: region: check for child regions before allocing image info

During a device tree overlay pre-apply notification, the check
for child FPGA regions can happen slightly earlier.  This saves
us from allocating the FPGA image info that just gets thrown
away.

This is a baby step in refactoring the FPGA region code to
separate out common FPGA region code from FPGA region
Device Tree overlay support.

Signed-off-by: Alan Tull <atull@kernel.org>
Acked-by: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/fpga/fpga-region.c