summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSooChan Lim <sc1.lim@samsung.com>2015-11-26 11:18:58 +0900
committerSooChan Lim <sc1.lim@samsung.com>2015-11-26 11:36:28 +0900
commite3a0f3c6906915cc23162945da5848d42aefdb51 (patch)
treeda4749d0d9f4edf17a55998690a98acf9bd05b81
parent731240f32d48d0435cc329679441fb01ac78cdd9 (diff)
downloadlibdrm-e3a0f3c6906915cc23162945da5848d42aefdb51.tar.gz
libdrm-e3a0f3c6906915cc23162945da5848d42aefdb51.tar.bz2
libdrm-e3a0f3c6906915cc23162945da5848d42aefdb51.zip
[SPRD] error check and delete list
Change-Id: I8452c7f445277f8c309333263bb57c25d1cac60c
-rwxr-xr-x[-rw-r--r--]sprd/sprd_drm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sprd/sprd_drm.c b/sprd/sprd_drm.c
index a81bae9d..8e0c7f5d 100644..100755
--- a/sprd/sprd_drm.c
+++ b/sprd/sprd_drm.c
@@ -1381,6 +1381,9 @@ static int sprd_drm_mode_set_crtc(int fd, void *arg)
uint32_t i;
uint32_t * ids;
+ if (fd = -1)
+ return -EINVAL;
+
memset(&conns, 0, sizeof(conns[0]) * MAX_CONNECTOR);
dev = get_sprd_device(fd);
@@ -1844,6 +1847,8 @@ void sprd_device_destroy(struct sprd_drm_device *dev)
{
//TODO::
+ DRMLISTDEL(&dev->link);
+
free(dev);
}