浏览代码

5,中bug修改

xuxinyi 1 年之前
父节点
当前提交
4ea3051867
共有 1 个文件被更改,包括 2 次插入5 次删除
  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) {