mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: add error codes to mm_l2_flush
gv11b_mm_l2_flush was not checking error codes from the various functions it was calling. MISRA Rule-17.7 requires the return value of all functions to be used. This patch now checks return values and propagates the error upstream. JIRA NVGPU-677 Change-Id: I9005c6d3a406f9665d318014d21a1da34f87ca30 Signed-off-by: Nicolas Benech <nbenech@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1998809 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
6bddc121c3
commit
e9c00c0da9
@@ -607,11 +607,17 @@ static int nvgpu_gpu_ioctl_l2_fb_ops(struct gk20a *g,
|
||||
(!args->l2_flush && args->l2_invalidate))
|
||||
return -EINVAL;
|
||||
|
||||
if (args->l2_flush)
|
||||
g->ops.mm.l2_flush(g, args->l2_invalidate ? true : false);
|
||||
if (args->l2_flush) {
|
||||
err = g->ops.mm.l2_flush(g, args->l2_invalidate ? true : false);
|
||||
if (err != 0) {
|
||||
nvgpu_err(g, "l2_flush failed");
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
if (args->fb_flush)
|
||||
if (args->fb_flush) {
|
||||
g->ops.mm.fb_flush(g);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user