]> git.baikalelectronics.ru Git - kernel.git/commit
ahci: fix nvec check
authorChristoph Hellwig <hch@lst.de>
Thu, 20 Oct 2016 15:15:41 +0000 (17:15 +0200)
committerTejun Heo <tj@kernel.org>
Thu, 20 Oct 2016 17:40:14 +0000 (13:40 -0400)
commitbf5de072db820935e348092a9501e7b3edb7838a
treecfc4712ffb2d1edfa7b762f0c8272e71297dc27c
parent84b817b80cb9097e4747bf6d50d0042f97fd1949
ahci: fix nvec check

commit 84b817b8 ("ahci: only try to use multi-MSI mode if there is more
than 1 port") lead to a case where nvec isn't initialized before it's
used.  Fix this by moving the check into the n_ports conditional.

Reported-and-reviewed-by Colin Ian King <colin.king@canonical.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/ahci.c