Skip to content

Commit

Permalink
staging: xgifb: fail the probe if no supported LCD video mode found
Browse files Browse the repository at this point in the history
Fail the probe if the LCD resolution described in card firmware does
not match any of the supported modes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Aaro Koskinen authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent 35c064d commit de736db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/staging/xgifb/XGI_main_26.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ static int XGIfb_GetXG21DefaultLVDSModeIdx(void)
XGIfb_mode_idx++;
}
if (!found_mode)
XGIfb_mode_idx = 0;
XGIfb_mode_idx = -1;

return XGIfb_mode_idx;
}
Expand Down Expand Up @@ -2313,6 +2313,11 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
}
}

if (xgifb_mode_idx < 0) {
dev_err(&pdev->dev, "no supported video mode found\n");
goto error_1;
}

if (xgi21_drvlcdcaplist) {
int m;

Expand Down

0 comments on commit de736db

Please sign in to comment.