pch_phub: return -ENODATA if ROM can't be mapped
commit a75fa128 upstream. The error return err is not initialized for the case when pci_map_rom fails and no ROM can me mapped. Fix this by setting ret to -ENODATA; (this is the same error value that is returned if the ROM data is successfully mapped but does not match the expected ROM signature.). Issue found from static code analysis using CoverityScan. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Showing
Please register or sign in to comment