# \[PATCH\] drivers/video/fbdev/sis: Add missing else

- Subsystems: FRAMEBUFFER LAYER, SIS FRAMEBUFFER DRIVER, THE REST
- Maintainers: Helge Deller, Linus Torvalds
- List: linux-fbdev
- 2 messages, 2 authors
- Page: https://ratatoskr.run/linux-fbdev/2014/06/4277989/t

## \[PATCH\] drivers/video/fbdev/sis: Add missing else

- From: Rasmus Villemoes \<linux@rasmusvillemoes.dk\>
- Date: 2014-06-20 20:00:24 
- Message: https://ratatoskr.run/linux-fbdev/2014/06/4277989.md

```text
The surrounding code and the fact that the previous two if's are
rendered useless without this "else" (since SIS_340=55 and XGI_20=75
are greater than SIS_661=15) suggests that the "else" is indeed
missing.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 drivers/video/fbdev/sis/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/sis/init.c b/drivers/video/fbdev/sis/init.c
index bd40f5e..dfe3eb7 100644
--- a/drivers/video/fbdev/sis/init.c
+++ b/drivers/video/fbdev/sis/init.c
@@ -1511,7 +1511,7 @@ SiS_Get310DRAMType(struct SiS_Private *SiS_Pr)
       } else if(SiS_Pr->ChipType >= SIS_340) {
 	 /* TODO */
 	 data = 0;
-      } if(SiS_Pr->ChipType >= SIS_661) {
+      } else if(SiS_Pr->ChipType >= SIS_661) {
 	 if(SiS_Pr->SiS_ROMNew) {
 	    data = ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x78) & 0xc0) >> 6);
 	 } else {
-- 
1.9.2

```

## Re: \[PATCH\] drivers/video/fbdev/sis: Add missing else

- From: Tomi Valkeinen \<hidden\>
- Date: 2014-06-23 12:07:28 
- Message: https://ratatoskr.run/linux-fbdev/2014/06/4278979.md

```text
On 20/06/14 22:59, Rasmus Villemoes wrote:
> The surrounding code and the fact that the previous two if's are
> rendered useless without this "else" (since SIS_340==55 and XGI_20==75
> are greater than SIS_661==15) suggests that the "else" is indeed
> missing.
> 
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> ---
>  drivers/video/fbdev/sis/init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/sis/init.c b/drivers/video/fbdev/sis/init.c
> index bd40f5e..dfe3eb7 100644
> --- a/drivers/video/fbdev/sis/init.c
> +++ b/drivers/video/fbdev/sis/init.c
> @@ -1511,7 +1511,7 @@ SiS_Get310DRAMType(struct SiS_Private *SiS_Pr)
>        } else if(SiS_Pr->ChipType >= SIS_340) {
>  	 /* TODO */
>  	 data = 0;
> -      } if(SiS_Pr->ChipType >= SIS_661) {
> +      } else if(SiS_Pr->ChipType >= SIS_661) {
>  	 if(SiS_Pr->SiS_ROMNew) {
>  	    data = ((SiS_GetReg(SiS_Pr->SiS_P3d4,0x78) & 0xc0) >> 6);
>  	 } else {
> 

I agree. Queued for 3.17.

 Tomi


```
