[PATCH] etnaviv: Prevent seg-fault when non-etnaviv card is present

Russell King rmk at armlinux.org.uk
Wed Aug 22 10:14:54 UTC 2018


Hi Ben,

Thanks for the patch, it looks fine, I'll apply these patches in the
next few days.  It would be nice to have something in the commit log
rather than just a summary and a sign-off line, thanks.

On Tue, Aug 21, 2018 at 11:19:25PM +0200, Ben Clouser wrote:
> Signed-off-by: Ben Clouser <ben.clouser at toradex.com>
> ---
>  Depends on patch from stefan at agner.ch: "etnaviv: use different error code"
>  etnaviv/etnadrm_module.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/etnaviv/etnadrm_module.c b/etnaviv/etnadrm_module.c
> index 5e97cee..ced2cea 100644
> --- a/etnaviv/etnadrm_module.c
> +++ b/etnaviv/etnadrm_module.c
> @@ -27,8 +27,12 @@ static pointer etnadrm_setup(pointer module, pointer opts, int *errmaj,
>  		return (pointer) 1;
>  	}
>  
> -	*errmaj = LDR_MODSPECIFIC;
> -	*errmin = 0;
> +	if(errmaj){
> +		*errmaj = LDR_MODSPECIFIC;
> +	}
> +	if(errmin){
> +		*errmin = 0;
> +	}
>  
>  	return NULL;
>  }
> -- 
> 2.7.4
> 

-- 
Russell King


More information about the etnaviv mailing list