On 2025-07-15 6:59 p.m., Dan Carpenter wrote:
Hello Zhanjun Dong,

Commit b2c4ac219fa4 ("drm/xe/uc: Disable GuC communication on
hardware initialization error") from Jul 7, 2025 (linux-next), leads
to the following Smatch static checker warning:

        drivers/gpu/drm/xe/xe_uc.c:167 vf_uc_load_hw()
        warn: missing unwind goto?

drivers/gpu/drm/xe/xe_uc.c
     147 static int vf_uc_load_hw(struct xe_uc *uc)
     148 {
     149         int err;
     150
     151         err = xe_uc_sanitize_reset(uc);
     152         if (err)
     153                 return err;
     154
     155         err = xe_guc_enable_communication(&uc->guc);
     156         if (err)
     157                 return err;
     158
     159         err = xe_gt_sriov_vf_connect(uc_to_gt(uc));
     160         if (err)
     161                 goto err_out;
     162
     163         uc->guc.submission_state.enabled = true;
     164
     165         err = xe_guc_opt_in_features_enable(&uc->guc);
     166         if (err)
--> 167                 return err;
                         ^^^^^^^^^^^
Should this be "goto err_out;" as well?
Thanks for point out the missing unwind, I will post a fix.

Regards,
Zhanjun Dong>
     168
     169         err = xe_gt_record_default_lrcs(uc_to_gt(uc));
     170         if (err)
     171                 goto err_out;
     172
     173         return 0;
     174
     175 err_out:
     176         xe_guc_sanitize(&uc->guc);
     177         return err;
     178 }

regards,
dan carpenter

Reply via email to