• Arnd Bergmann's avatar
    mtd/omap2: fix dmaengine_slave_config error handling · d680e2c1
    Arnd Bergmann authored
    The newly added dmaengine support in the omap2 nand driver
    potentially causes an undefined return value from the
    omap_nand_probe function when dmaengine_slave_config
    reports an error. Let's handle this by returning the
    same error back to the caller.
    
    Without this patch, building omap2plus_defconfig results in:
    
    drivers/mtd/nand/omap2.c: In function 'omap_nand_probe':
    drivers/mtd/nand/omap2.c:1154:6: warning: 'err' may be used uninitialized in this function [-Wuninitialized]
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Cc: Russell King <rmk+kernel@arm.linux.org.uk>
    Cc: Grazvydas Ignotas <notasas@gmail.com>
    d680e2c1
omap2.c 37.7 KB