[Beignet] [PATCH] Don't crash if device inaccessible
Zhigang Gong
zhigang.gong at linux.intel.com
Mon Mar 23 22:13:49 PDT 2015
LGTM, will push latter, thanks.
On Sat, Mar 21, 2015 at 07:37:00AM +0000, Rebecca N. Palmer wrote:
> If /dev/dri/cardX is inaccessible, return CL_DEVICE_NOT_FOUND,
> don't assert-fail.
>
> Signed-off-by: Rebecca Palmer <rebecca_palmer at zoho.com>
>
> diff --git a/src/x11/dricommon.c b/src/x11/dricommon.c
> index 03f542c..16f50e4 100644
> --- a/src/x11/dricommon.c
> +++ b/src/x11/dricommon.c
> @@ -284,7 +284,6 @@ getDRI2State(Display* dpy, int screen, char **driver_name)
> goto err_out;
> fd = open(device_name, O_RDWR);
> - assert(fd >= 0);
> if (fd < 0)
> goto err_out;
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list