OSDN Git Service

msm: kgsl: Allow 0 as a valid ion file descriptor
authorCarter Cooper <ccooper@codeaurora.org>
Mon, 20 Jun 2016 21:25:45 +0000 (15:25 -0600)
committerCarter Cooper <ccooper@codeaurora.org>
Wed, 3 Aug 2016 16:34:05 +0000 (10:34 -0600)
Treat 0 as a valid fd instead of treating it as an error.

CRs-Fixed: 1030098
Change-Id: I4a1b14fcbca617bc2a43b30af7256edc3920f04c
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
drivers/gpu/msm/kgsl.c

index 059570d..d421759 100644 (file)
@@ -2249,7 +2249,7 @@ static long _gpuobj_map_dma_buf(struct kgsl_device *device,
        if (ret)
                return ret;
 
-       if (buf.fd == 0)
+       if (buf.fd < 0)
                return -EINVAL;
 
        *fd = buf.fd;