From: Mark Janes Date: Thu, 19 May 2016 20:42:16 +0000 (-0700) Subject: i965: Fix strerror error code sign X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a2d28ddc016af5e819f4b8648a64893b331095b2;p=mesa.git 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 --- 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