diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-04-07 18:39:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-07 19:36:09 -0400 |
commit | b6a83d928c652c092acd1ce79c19d44a1da9a6db (patch) | |
tree | 865827d91d7bd91e6b588f84b4daae835dbddcd2 /drivers/misc | |
parent | d7c0847fe3682a026ee6d147c5b6b8ab457fffc8 (diff) |
drivers/misc/sgi-gru/grukdump.c: cleanup gru_dump_context() a little
"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 <dan.carpenter@oracle.com>
Acked-by: Dimitri Sivanich <sivanich@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/sgi-gru/grukdump.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/sgi-gru/grukdump.c b/drivers/misc/sgi-gru/grukdump.c index 2bef3f76032a..a3700a56b8ff 100644 --- 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, | |||
178 | hdr.cbrcnt = cbrcnt; | 178 | hdr.cbrcnt = cbrcnt; |
179 | hdr.dsrcnt = dsrcnt; | 179 | hdr.dsrcnt = dsrcnt; |
180 | hdr.cch_locked = cch_locked; | 180 | hdr.cch_locked = cch_locked; |
181 | if (!ret && copy_to_user((void __user *)uhdr, &hdr, sizeof(hdr))) | 181 | if (copy_to_user(uhdr, &hdr, sizeof(hdr))) |
182 | ret = -EFAULT; | 182 | return -EFAULT; |
183 | 183 | ||
184 | return ret ? ret : bytes; | 184 | return bytes; |
185 | } | 185 | } |
186 | 186 | ||
187 | int gru_dump_chiplet_request(unsigned long arg) | 187 | int gru_dump_chiplet_request(unsigned long arg) |