• Harald Welte's avatar
    viafb: Fix various resource leaks during module_init() · 109771a6
    Harald Welte authored
    
    
    The current code executed from module_init() in viafb does not have
    proper error checking and [partial] resoure release paths in case
    an error happens half way through driver initialization.
    
    This patch adresses the most obvious of those issues, such as a
    leftover i2c bus if module_init (and thus module load) fails.
    
    [jc: fixed merge conflicts]
    [jc: also restored -ENOMEM return on ioremap() fail]
    
    Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
    Cc: ScottFang@viatech.com.cn
    Cc: JosephChan@via.com.tw
    Signed-off-by: default avatarHarald Welte <HaraldWelte@viatech.com>
    109771a6
viafbdev.c 61.4 KB