mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
thunderbolt: Do not try to read UID if DROM offset is read as 0
At least Falcon Ridge when in host mode does not have any kind of DROM available and reading DROM offset returns 0 for these. Do not try to read DROM any further in that case. Signed-off-by: Mika Westerberg <[email protected]> Reviewed-by: Yehezkel Bernat <[email protected]> Reviewed-by: Michael Jamet <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Andreas Noever <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
08a5e4cebe
commit
df1421b5f7
1 changed files with 3 additions and 0 deletions
|
|
@ -276,6 +276,9 @@ int tb_drom_read_uid_only(struct tb_switch *sw, u64 *uid)
|
|||
if (res)
|
||||
return res;
|
||||
|
||||
if (drom_offset == 0)
|
||||
return -ENODEV;
|
||||
|
||||
/* read uid */
|
||||
res = tb_eeprom_read_n(sw, drom_offset, data, 9);
|
||||
if (res)
|
||||
|
|
|
|||
Loading…
Reference in a new issue