提交 e0044c98 编写于 作者: D Dan Carpenter 提交者: Jeff Garzik

pata_legacy: bogus clock in opti82c46x_set_piomode()

"sysclk" is used as an index into a 4 element array.  My static
checker complains because it can be out of bounds.  From the
context, it looks like there is a right bit shift missing.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 bdfa2e7e
......@@ -542,7 +542,7 @@ static void opti82c46x_set_piomode(struct ata_port *ap, struct ata_device *adev)
u8 sysclk;
/* Get the clock */
sysclk = opti_syscfg(0xAC) & 0xC0; /* BIOS set */
sysclk = (opti_syscfg(0xAC) & 0xC0) >> 6; /* BIOS set */
/* Enter configuration mode */
ioread16(ap->ioaddr.error_addr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册