Skip to content
  • Peng Fan's avatar
    tools: imximage: check return value when open the plugin file · 2a380ccc
    Peng Fan authored
    
    
    Check return value when open the plugin file.
    
    Coverity report:
    ** CID 153926:  Error handling issues  (NEGATIVE_RETURNS)
    /tools/imximage.c: 542 in copy_plugin_code()
    
       ifd = open(plugin_file, O_RDONLY|O_BINARY);
    >>>  CID 153926:  Error handling issues  (NEGATIVE_RETURNS)
    >>> "ifd" is passed to a parameter that cannot be negative.
    
    Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
    Cc: Stefano Babic <sbabic@denx.de>
    Cc: Tom Rini <trini@konsulko.com>
    Reported-by: Coverity (CID: 153926)
    Reviewed-by: default avatarTom Rini <trini@konsulko.com>
    2a380ccc