From: Greg Kroah-Hartman Date: Tue, 10 Mar 2015 21:08:38 +0000 (+0100) Subject: Staging: sm750fb: provide error path for hw_sm750le_setBLANK() X-Git-Tag: v4.1-rc1~152^2~138^2~484 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e74ac550298ec4635cc32e99f966568a808fd370;p=karo-tx-linux.git Staging: sm750fb: provide error path for hw_sm750le_setBLANK() 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 Cc: Teddy Wang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c index a2b7fe219594..c44a50b0c489 100644 --- a/drivers/staging/sm750fb/sm750_hw.c +++ b/drivers/staging/sm750fb/sm750_hw.c @@ -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){