Commit 2781c928 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/bios/pll: prevent oops when limits table can't be parsed

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent d07a97e9
......@@ -156,7 +156,7 @@ pll_map_reg(struct nvkm_bios *bios, u32 reg, u32 *type, u8 *ver, u8 *len)
}
map = pll_map(bios);
while (map->reg) {
while (map && map->reg) {
if (map->reg == reg && *ver >= 0x20) {
u16 addr = (data += hdr);
*type = map->type;
......@@ -198,7 +198,7 @@ pll_map_type(struct nvkm_bios *bios, u8 type, u32 *reg, u8 *ver, u8 *len)
}
map = pll_map(bios);
while (map->reg) {
while (map && map->reg) {
if (map->type == type && *ver >= 0x20) {
u16 addr = (data += hdr);
*reg = map->reg;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment