|
@@ -178,10 +178,10 @@ static int gru_dump_context(struct gru_state *gru, int ctxnum,
|
|
hdr.cbrcnt = cbrcnt;
|
|
hdr.cbrcnt = cbrcnt;
|
|
hdr.dsrcnt = dsrcnt;
|
|
hdr.dsrcnt = dsrcnt;
|
|
hdr.cch_locked = cch_locked;
|
|
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)))
|
|
|
|
+ return -EFAULT;
|
|
|
|
|
|
- return ret ? ret : bytes;
|
|
|
|
|
|
+ return bytes;
|
|
}
|
|
}
|
|
|
|
|
|
int gru_dump_chiplet_request(unsigned long arg)
|
|
int gru_dump_chiplet_request(unsigned long arg)
|