>> + memcpy(dcmi->sd_formats, sd_fmts, num_fmts * sizeof(*dcmi->sd_formats)); > > devm_kmemdup Are function variants provided which handle memory duplications for arrays explicitly? Regards, Markus