소스 검색

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);
     comppro = of_find_property(nd, "compatible", NULL);
     if(comppro == NULL){
     if(comppro == NULL){
-        ret = -EINVAL;
-        goto fail_finish;
+       return -EINVAL;
     }else{
     }else{
         printk("compatible=%s\r\n",(char *)comppro->value);
         printk("compatible=%s\r\n",(char *)comppro->value);
     }
     }
-
-goto fail_finish:
-    return ret;
+    return 0;
 }
 }
 
 
 static void __exit helloworld_exit(void) {
 static void __exit helloworld_exit(void) {