staging: xgifb: XGIfb_search_mode(): delete unreachable code
authorAaro Koskinen <aaro.koskinen@iki.fi>
Mon, 29 Aug 2011 20:14:26 +0000 (23:14 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Sep 2011 18:41:22 +0000 (11:41 -0700)
XGIfb_search_mode() is always called with a valid string pointer.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/xgifb/XGI_main_26.c

index a9dc9489e342a57271850958ae20f1204e242b20..074fe4f9606ebef2a4ad2cb15599e8136aa051e4 100644 (file)
@@ -458,17 +458,6 @@ static void XGIfb_search_mode(const char *name)
 {
        int i = 0, j = 0, l;
 
-       if (name == NULL) {
-               printk(KERN_ERR "XGIfb: Internal error, using default mode.\n");
-               xgifb_mode_idx = DEFAULT_MODE;
-               if ((xgi_video_info.chip == XG21)
-                               && ((xgi_video_info.disp_state & DISPTYPE_DISP2)
-                                               == DISPTYPE_LCD)) {
-                       xgifb_mode_idx = XGIfb_GetXG21DefaultLVDSModeIdx();
-               }
-               return;
-       }
-
        if (!strcmp(name, XGIbios_mode[MODE_INDEX_NONE].name)) {
                printk(KERN_ERR "XGIfb: Mode 'none' not supported anymore. Using default.\n");
                xgifb_mode_idx = DEFAULT_MODE;