diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-12-02 12:40:26 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-12-02 14:17:04 +0000 |
commit | acb4aa671507aa181b3ff50ccf26a1c0d705a309 (patch) | |
tree | ac34b4422a04d3acfe0831b7c229ee044db44d4f /nouveau/nouveau_device.c | |
parent | 9fec2a8cb28d814da4fdd97b25e9cc5c10768c87 (diff) |
intel: Review use of errno.
Hitting this error lead to a segfault:
intel_bufmgr_gem.c:919: Error mapping buffer 48607 (pixmap):
Cannot allocate memory.
because the errno was reused as the function return value after being
reset by the fprintf(), so caller thought the mapping had succeeded. The
convention established by libdrm is that the return value is the
negative errno and that uses of libdrm cannot trust the value of errno
afterwards, but must use the return code.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'nouveau/nouveau_device.c')
0 files changed, 0 insertions, 0 deletions