Re: [PATCH 3/3] drm/msm: Simplify NULL checking in msm_disp_state_dump_regs()

From: Abhinav Kumar
Date: Mon Oct 14 2024 - 15:04:07 EST




On 10/14/2024 9:36 AM, Douglas Anderson wrote:
The msm_disp_state_dump_regs():

- Doesn't allocate if the caller already allocated. ...but there's one
caller and it doesn't allocate so we don't need this check.
- Checks for allocation failure over and over even though it could
just do it once right after the allocation.

Clean this up.

Signed-off-by: Douglas Anderson <dianders@xxxxxxxxxxxx>
---

.../gpu/drm/msm/disp/msm_disp_snapshot_util.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)


Reviewed-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>