提交 8b00e183 编写于 作者: D Dan Carpenter 提交者: Tomi Valkeinen

fbdev/atyfb: fix recent breakage in correct_chipset()

The 6e36308a "fb: fix atyfb build warning" isn't right.  It makes all
the indexes off by one.  This patch reverts it and casts the
ARRAY_SIZE() to int to silence the build warning.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 6d3488a5
......@@ -435,8 +435,8 @@ static int correct_chipset(struct atyfb_par *par)
const char *name;
int i;
for (i = ARRAY_SIZE(aty_chips); i > 0; i--)
if (par->pci_id == aty_chips[i - 1].pci_id)
for (i = (int)ARRAY_SIZE(aty_chips) - 1; i >= 0; i--)
if (par->pci_id == aty_chips[i].pci_id)
break;
if (i < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册