mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-02-04 08:04:49 +00:00
siihdmi: fix a division by zero when HDMI VSDB gives out 0 as the maximum TMDS clock capability
This commit is contained in:
@@ -245,13 +245,16 @@ static int siihdmi_initialise(struct siihdmi_tx *tx)
|
||||
static inline void _process_cea861_vsdb(struct siihdmi_tx *tx,
|
||||
const struct hdmi_vsdb * const vsdb)
|
||||
{
|
||||
unsigned int max_tmds;
|
||||
unsigned int max_tmds = 0;
|
||||
|
||||
if (memcmp(vsdb->ieee_registration, CEA861_OUI_REGISTRATION_ID_HDMI_LSB,
|
||||
sizeof(vsdb->ieee_registration)))
|
||||
sizeof(vsdb->ieee_registration))) {
|
||||
WARNING("VSDB does not contain HDMI OUI\n");
|
||||
return;
|
||||
}
|
||||
|
||||
max_tmds = KHZ2PICOS(vsdb->max_tmds_clock * 200);
|
||||
if (vsdb->max_tmds_clock)
|
||||
max_tmds = KHZ2PICOS(vsdb->max_tmds_clock * 200);
|
||||
|
||||
DBG("HDMI VSDB detected (basic audio %ssupported)\n",
|
||||
tx->audio.available ? "" : "not ");
|
||||
|
||||
Reference in New Issue
Block a user