kmstest: check return values from reserve_*
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 21 Mar 2017 09:51:28 +0000 (11:51 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 21 Mar 2017 09:51:28 +0000 (11:51 +0200)
utils/kmstest.cpp

index 32dcb69c00cecc39d765062462d1a8156d57f352..e412f90869529a9c39ab915ab28421fc01e5bd56 100644 (file)
@@ -497,7 +497,9 @@ static vector<OutputInfo> setups_to_outputs(Card& card, ResourceManager& resman,
 
                        OutputInfo output = { };
                        output.connector = resman.reserve_connector(conn);
+                       EXIT_IF(!output.connector, "Failed to reserve connector %s", conn->fullname().c_str());
                        output.crtc = resman.reserve_crtc(conn);
+                       EXIT_IF(!output.crtc, "Failed to reserve crtc for %s", conn->fullname().c_str());
                        output.mode = output.connector->get_default_mode();
 
                        output.fbs = get_default_fb(card, output.mode.hdisplay, output.mode.vdisplay);