pch_phub: return -ENODATA if ROM can't be mapped
authorColin Ian King <colin.king@canonical.com>
Sat, 27 Feb 2016 14:52:22 +0000 (14:52 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Mar 2016 20:19:39 +0000 (12:19 -0800)
commita75fa128236bc2fdaa5e412145cbd577e42e14c2
treee24d74c9d691ca78a5a683c720f30dbcec00ba99
parent7268644734f6a300353a4c4ff8bf3e013ba80f89
pch_phub: return -ENODATA if ROM can't be mapped

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>
drivers/misc/pch_phub.c