Re: [PATCH 02/16 v3] pramfs: super operations

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: yidong zhang
Date: Sunday, November 14, 2010 - 7:27 pm

hi Marco

  I think kfree(sbi) should not be put here. In case of
pram_parse_options failure, sbi should also be freed too.  How about
change it to the list below? And change some “goto out”   branches to
“goto out_free”.

 //    retval = 0;
     return 0;
 out:
       if (retval && sbi->virt_addr) {
               iounmap(sbi->virt_addr);
               release_mem_region(sbi->phys_addr, initsize);
       }
out_free:
               kfree(sbi);
       return retval;
}
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 02/16 v3] pramfs: super operations, Marco Stornelli, (Sat Nov 13, 7:48 am)
Re: [PATCH 02/16 v3] pramfs: super operations, yidong zhang, (Sun Nov 14, 7:27 pm)