Staging: sm750fb: provide error path for hw_sm750le_setBLANK()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Mar 2015 21:08:38 +0000 (22:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Mar 2015 21:08:38 +0000 (22:08 +0100)
This provides a default path for the switch statement in
hw_sm750le_setBLANK() so that the compiler will not correctly complain
about undefined values being sent to the hardware.

Instead, properly error out if the blank command is unknown by the
driver.

Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm750fb/sm750_hw.c

index a2b7fe21959488bcd40d755ee6a21c81635f6c7e..c44a50b0c4897d60d30fc95d7494311253c8d542 100644 (file)
@@ -472,6 +472,8 @@ int hw_sm750le_setBLANK(struct lynxfb_output * output,int blank){
                        dpms = CRT_DISPLAY_CTRL_DPMS_3;
                        crtdb = CRT_DISPLAY_CTRL_BLANK_ON;
                        break;
+               default:
+                       return -EINVAL;
        }
 
        if(output->paths & sm750_crt){