[AMD Official Use Only - General] Please ignore this patch, will send V2.
> -----Original Message----- > From: Stanley.Yang <stanley.y...@amd.com> > Sent: Friday, September 15, 2023 6:57 PM > To: amd-gfx@lists.freedesktop.org > Cc: Yang, Stanley <stanley.y...@amd.com> > Subject: [PATCH Review 1/1] drm/amdgpu: Fix false positive error log > > It should first check block ras obj whether be set, it should return directly > if > block ras obj is not set. > > Signed-off-by: Stanley.Yang <stanley.y...@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > index 4a6df4e24243..ee62f5fa4456 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > @@ -1105,10 +1105,13 @@ int amdgpu_ras_reset_error_status(struct > amdgpu_device *adev, { > struct amdgpu_ras_block_object *block_obj = > amdgpu_ras_get_ras_block(adev, block, 0); > > + if (!block_obj) > + return 0; > + > if (!amdgpu_ras_is_supported(adev, block)) > return -EINVAL; > > - if (!block_obj || !block_obj->hw_ops) { > + if (!block_obj->hw_ops) { > dev_dbg_once(adev->dev, "%s doesn't config RAS > function\n", > ras_block_str(block)); > return -EINVAL; > -- > 2.25.1