Merge tag 'for-linus-20181012' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / drivers / fpga / of-fpga-region.c
index 35fabb8..052a134 100644 (file)
@@ -437,9 +437,10 @@ eprobe_mgr_put:
 static int of_fpga_region_remove(struct platform_device *pdev)
 {
        struct fpga_region *region = platform_get_drvdata(pdev);
+       struct fpga_manager *mgr = region->mgr;
 
        fpga_region_unregister(region);
-       fpga_mgr_put(region->mgr);
+       fpga_mgr_put(mgr);
 
        return 0;
 }