浏览代码

MIPS: TXx9: Fix quirk_slc90e66_ide

Fix wrong code spotted by -Werror=array-bounds:
	arch/mips/txx9/generic/pci.c:334:23: error: array subscript is above array bounds [-Werror=array-bounds]
	  pci_write_config_byte(dev, regs[i], dat);

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7214/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Atsushi Nemoto 11 年之前
父节点
当前提交
ad6f9022da
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/mips/txx9/generic/pci.c

+ 1 - 1
arch/mips/txx9/generic/pci.c

@@ -331,7 +331,7 @@ static void quirk_slc90e66_ide(struct pci_dev *dev)
 	 * !!! DO NOT REMOVE THIS COMMENT IT IS REQUIRED BY SMSC !!!
 	 */
 	dat |= 0x01;
-	pci_write_config_byte(dev, regs[i], dat);
+	pci_write_config_byte(dev, 0x5c, dat);
 	pci_read_config_byte(dev, 0x5c, &dat);
 	printk(KERN_CONT " REG5C %02x", dat);
 	printk(KERN_CONT "\n");