]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
IB/hfi1: fix sdma_descq_cnt parameter parsing
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Tue, 15 Sep 2015 14:19:27 +0000 (10:19 -0400)
committerDoug Ledford <dledford@redhat.com>
Fri, 18 Sep 2015 15:28:47 +0000 (11:28 -0400)
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>
drivers/staging/rdma/hfi1/sdma.c

index a8c903caecce0ce4b3d15edfa29cddf351becd33..7e01f30f67b9e2d40c301864bbb91965e68b32fc 100644 (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;
 }