lkml.org 
[lkml]   [2023]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/6] media: platform: venus: Add optional LLCC path
On Fri, Aug 04, 2023 at 10:09:11PM +0200, Konrad Dybcio wrote:

> @@ -479,12 +488,18 @@ static __maybe_unused int venus_runtime_suspend(struct device *dev)
> if (ret)
> goto err_cpucfg_path;
>
> + ret = icc_set_bw(core->llcc_path, 0, 0);
> + if (ret)
> + goto err_llcc_path;
> +
> ret = icc_set_bw(core->video_path, 0, 0);
> if (ret)
> goto err_video_path;
>
> return ret;
>
> +err_llcc_path:
> + icc_set_bw(core->video_path, kbps_to_icc(20000), 0);

This looks wrong; you should not try to restore the video path bw which
you have not yet updated here.

Also error labels should be named after what they do, not after where
you jump from (e.g. to avoid mistakes like the above). Perhaps you can
clean up the existing labels before adding the new one.

> err_video_path:
> icc_set_bw(core->cpucfg_path, kbps_to_icc(1000), 0);
> err_cpucfg_path:

Johan

\
 
 \ /
  Last update: 2023-08-07 12:43    [W:0.228 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site