IB/hfi1: fix sdma_descq_cnt parameter parsing

The boolean tests should have been or-ed.

Reported-by: David Binderman <dcb314@hotmail.com>
Reviewed-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
Mike Marciniszyn 2015-09-15 10:19:27 -04:00 committed by Doug Ledford
parent e1df0068a2
commit aeef010a0f

View File

@ -737,7 +737,7 @@ u16 sdma_get_descq_cnt(void)
*/
if (!is_power_of_2(count))
return SDMA_DESCQ_CNT;
if (count < 64 && count > 32768)
if (count < 64 || count > 32768)
return SDMA_DESCQ_CNT;
return count;
}