xuxinyi 1 éve
szülő
commit
4ea3051867
1 módosított fájl, 2 hozzáadás és 5 törlés
  1. 2 5
      驱动文件/5/dtsof.c

+ 2 - 5
驱动文件/5/dtsof.c

@@ -19,14 +19,11 @@ static int __init helloworld_init(void) {
 
     comppro = of_find_property(nd, "compatible", NULL);
     if(comppro == NULL){
-        ret = -EINVAL;
-        goto fail_finish;
+       return -EINVAL;
     }else{
         printk("compatible=%s\r\n",(char *)comppro->value);
     }
-
-goto fail_finish:
-    return ret;
+    return 0;
 }
 
 static void __exit helloworld_exit(void) {