From 3a3edd0e4fe9e2c6e7c5cba71805b2abce2eb474 Mon Sep 17 00:00:00 2001 From: Debarshi Dutta Date: Wed, 11 Jul 2018 10:48:42 +0530 Subject: gpu: nvgpu: handle error return for exec_reg_ops failure. The error returned from the execution of exec_reg_ops was ignored leading to not propagating the error values to the caller methods. This patch handles the error occurence in the exec_reg_ops call. Bug 2245743 Change-Id: I0d696c116fc1b2fce0e14ac7a05e1d85b5d18129 Signed-off-by: Debarshi Dutta Reviewed-on: https://git-master.nvidia.com/r/1775818 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/ioctl_dbg.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/gpu/nvgpu/os/linux/ioctl_dbg.c') diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c b/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c index ad4dfc0e..b2c7a362 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c @@ -938,6 +938,10 @@ static int nvgpu_ioctl_channel_reg_ops(struct dbg_session_gk20a *dbg_s, err = g->ops.dbg_session_ops.exec_reg_ops( dbg_s, g->dbg_regops_tmp_buf, num_ops); + if (err) { + break; + } + err = nvgpu_get_regops_data_linux(g->dbg_regops_tmp_buf, linux_fragment, num_ops); -- cgit v1.2.2