staging: atomisp: remove unnecessary else after return in atomisp_cmd.c
Subsystems (4)
PATCH 1/1 staging: atomisp: remove unnecessary else after return in atomisp_cmd.c
Remove unnecessary else clause after return statement as the else branch is not needed when the if branch alsways returns.
--- drivers/staging/media/atomisp/pci/atomisp_cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +1 -2
@@ -2035,8 +2035,7 @@ static unsigned int long copy_from_compatible(void *to, const void *from, {if (from_user)return copy_from_user (to, (void __user *)from, n); -else -memcpy (to, from, n); +memcpy (to, from, n);return 0 ; }
Signature · 1 line
2.43.0
Quoted 2 lines · Oskar Ray-Frayssinet
Remove unnecessary else clause after return statement as the else branch is not needed when the if branch alsways returns.
Typo alsways.
Quoted 3 lines
Signed-off-by Oskar Ray-Frayssinet <[email protected]>---
...
drivers/staging/media/atomisp/pci/atomisp_cmd.c static unsigned int long copy_from_compatible(void *to, const void *from, · line 2039
Quoted 4 lines
drivers/staging/media/atomisp/pci/atomisp_cmd.c +0
-2if (from_user)return copy_from_user (to, (void __user *)from, n); -else -memcpy (to, from, n);
Put blank line here.
drivers/staging/media/atomisp/pci/atomisp_cmd.c static unsigned int long copy_from_compatible(void *to, const void *from, · line 2040
Quoted 4 lines
drivers/staging/media/atomisp/pci/atomisp_cmd.c +1
-0+memcpy (to, from, n);return 0 ; }
Also from what I can tell your sending a few patches affecting the same driver, typically you'd make it a patch series with a cover letter.
Thanks,
ET