xuxinyi před 1 rokem
rodič
revize
4ea3051867
1 změnil soubory, kde provedl 2 přidání a 5 odebrání
  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) {