* [PATCH] staging: atomisp: remove unnecessary else after return in atomisp_cmd.c
@ 2026-03-01 21:20 Oskar Ray-Frayssinet
2026-03-01 21:46 ` Ethan Tidmore
0 siblings, 1 reply; 2+ messages in thread
From: Oskar Ray-Frayssinet @ 2026-03-01 21:20 UTC (permalink / raw)
To: hansg, gregkh; +Cc: linux-staging, linux-media, Oskar Ray-Frayssinet
Remove unnecessary else clause after return statement as the else
branch is not needed when the if branch alsways returns.
Signed-off-by: Oskar Ray-Frayssinet <rayfraytech@gmail.com>
---
drivers/staging/media/atomisp/pci/atomisp_cmd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
index 9d22ec27ea76..d5c5895e06e2 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
@@ -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;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: atomisp: remove unnecessary else after return in atomisp_cmd.c
2026-03-01 21:20 [PATCH] staging: atomisp: remove unnecessary else after return in atomisp_cmd.c Oskar Ray-Frayssinet
@ 2026-03-01 21:46 ` Ethan Tidmore
0 siblings, 0 replies; 2+ messages in thread
From: Ethan Tidmore @ 2026-03-01 21:46 UTC (permalink / raw)
To: Oskar Ray-Frayssinet, hansg, gregkh; +Cc: linux-staging, linux-media
On Sun Mar 1, 2026 at 3:20 PM CST, Oskar Ray-Frayssinet wrote:
> Remove unnecessary else clause after return statement as the else
> branch is not needed when the if branch alsways returns.
Typo alsways.
>
> Signed-off-by: Oskar Ray-Frayssinet <rayfraytech@gmail.com>
> ---
...
> if (from_user)
> return copy_from_user(to, (void __user *)from, n);
> - else
> - memcpy(to, from, n);
Put blank line here.
> + 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-01 21:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-01 21:20 [PATCH] staging: atomisp: remove unnecessary else after return in atomisp_cmd.c Oskar Ray-Frayssinet
2026-03-01 21:46 ` Ethan Tidmore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox