[PATCH] etnaviv: Prevent seg-fault when non-etnaviv card is present
Ben Clouser
bclouse91 at gmail.com
Tue Aug 21 21:19:25 UTC 2018
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
More information about the etnaviv
mailing list