From a2d28ddc016af5e819f4b8648a64893b331095b2 Mon Sep 17 00:00:00 2001 From: Mark Janes Date: Thu, 19 May 2016 13:42:16 -0700 Subject: [PATCH] i965: Fix strerror error code sign This trivial fix to error-handling corrects the sign of drm error codes before passing them to strerror. Identified by Coverity: CID1358581 --- src/mesa/drivers/dri/i965/intel_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 1a0541a6c7c..076fa24cd6f 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -1111,7 +1111,7 @@ intel_detect_sseu(struct intel_screen *intelScreen) err_out: intelScreen->subslice_total = -1; intelScreen->eu_total = -1; - _mesa_warning(NULL, "Failed to query GPU properties (%s).\n", strerror(ret)); + _mesa_warning(NULL, "Failed to query GPU properties (%s).\n", strerror(-ret)); } static bool -- 2.30.2