Re: [PATCH] staging: iio: accel: remove impossible condition

2016-05-31 Thread Luis de Bethencourt
On 31/05/16 21:23, Jonathan Cameron wrote: > > > On 31 May 2016 20:47:50 BST, Luis de Bethencourt > wrote: >> val is set to the value of ret right after ret is checked. If ret is >> not >> zero it goes to error_ret. So only value ret can have is zero, which >> makes >> the switch (val & 0x03) o

Re: [PATCH] staging: iio: accel: remove impossible condition

2016-05-31 Thread Jonathan Cameron
On 31 May 2016 20:47:50 BST, Luis de Bethencourt wrote: >val is set to the value of ret right after ret is checked. If ret is >not >zero it goes to error_ret. So only value ret can have is zero, which >makes >the switch (val & 0x03) only match the case 0x00. Removing the switch >and >since val i

Re: [PATCH] staging: iio: accel: remove impossible condition

2016-05-31 Thread Andrew F. Davis
On 05/31/2016 02:47 PM, Luis de Bethencourt wrote: > val is set to the value of ret right after ret is checked. If ret is not > zero it goes to error_ret. So only value ret can have is zero, which makes > the switch (val & 0x03) only match the case 0x00. Removing the switch and > since val is only

[PATCH] staging: iio: accel: remove impossible condition

2016-05-31 Thread Luis de Bethencourt
val is set to the value of ret right after ret is checked. If ret is not zero it goes to error_ret. So only value ret can have is zero, which makes the switch (val & 0x03) only match the case 0x00. Removing the switch and since val is only used for this, removing val as well. Signed-off-by: Luis d