aboutsummaryrefslogtreecommitdiffstats
path: root/src/gamma-linux-drm.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-05-25 05:12:45 +0200
committerMattias Andrée <maandree@operamail.com>2014-05-25 05:12:45 +0200
commit68dcdaba48c3e06cb80664d08577cc8923241f5c (patch)
tree77214b3c0fcf98aabf9c3a91c7fcc6059a70087b /src/gamma-linux-drm.c
parentm + gamma-x-randr: get_edid (diff)
downloadlibgamma-68dcdaba48c3e06cb80664d08577cc8923241f5c.tar.gz
libgamma-68dcdaba48c3e06cb80664d08577cc8923241f5c.tar.bz2
libgamma-68dcdaba48c3e06cb80664d08577cc8923241f5c.tar.xz
m + gamma-x-randr: get output and output info
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/gamma-linux-drm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gamma-linux-drm.c b/src/gamma-linux-drm.c
index 18ebf2b..bdb231c 100644
--- a/src/gamma-linux-drm.c
+++ b/src/gamma-linux-drm.c
@@ -608,7 +608,10 @@ static int get_edid(libgamma_crtc_state_t* restrict crtc,
{
blob = drmModeGetPropertyBlob(card->fd, (uint32_t)(connector->prop_values[prop_i]));
if (blob == NULL)
- goto fail_blob;
+ {
+ drmModeFreeProperty(prop);
+ return out->edid_error = LIBGAMMA_PROPERTY_VALUE_QUERY_FAILED;
+ }
if (blob->data != NULL)
{
out->edid_length = blob->length;
@@ -622,11 +625,9 @@ static int get_edid(libgamma_crtc_state_t* restrict crtc,
}
drmModeFreePropertyBlob(blob);
}
- fail_blob:
drmModeFreeProperty(prop);
}
- out->edid_error = LIBGAMMA_EDID_NOT_FOUND;
- return -1;
+ return out->edid_error = LIBGAMMA_EDID_NOT_FOUND;
}