projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d7c0847
)
drivers/misc/sgi-gru/grukdump.c: cleanup gru_dump_context() a little
author
Dan Carpenter
<
[email protected]
>
Mon, 7 Apr 2014 22:39:03 +0000
(15:39 -0700)
committer
Linus Torvalds
<
[email protected]
>
Mon, 7 Apr 2014 23:36:09 +0000
(16:36 -0700)
"ret" is zero here so we can remove the "!ret" part of the condition.
"uhdr" is alread a __user pointer so we can remove the cast.
Signed-off-by: Dan Carpenter <
[email protected]
>
Acked-by: Dimitri Sivanich <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/misc/sgi-gru/grukdump.c
patch
|
blob
|
history
diff --git
a/drivers/misc/sgi-gru/grukdump.c
b/drivers/misc/sgi-gru/grukdump.c
index 2bef3f76032aa117d8bc2fa06451e832118acce1..a3700a56b8ff677d4b972de099ef6cde5b49ea9a 100644
(file)
--- a/
drivers/misc/sgi-gru/grukdump.c
+++ b/
drivers/misc/sgi-gru/grukdump.c
@@
-178,10
+178,10
@@
static int gru_dump_context(struct gru_state *gru, int ctxnum,
hdr.cbrcnt = cbrcnt;
hdr.dsrcnt = dsrcnt;
hdr.cch_locked = cch_locked;
- if (
!ret && copy_to_user((void __user *)
uhdr, &hdr, sizeof(hdr)))
- ret
=
-EFAULT;
+ if (
copy_to_user(
uhdr, &hdr, sizeof(hdr)))
+ ret
urn
-EFAULT;
- return
ret ? ret :
bytes;
+ return bytes;
}
int gru_dump_chiplet_request(unsigned long arg)