FYI–
This is still an issue in Jetpack 5.1.2, apparently. I’m not using macsec. My approach is to add this after the devm_kfree()
at the init-err
label:
pdata->macsec_pdata = NULL;
Thanks for digging into things @haensler! Your info made for a very quick fix.