···774774EXPORT_SYMBOL(snd_vx_resume);775775#endif776776777777+static void snd_vx_release(struct device *dev, void *data)778778+{779779+ snd_vx_free_firmware(data);780780+}781781+777782/**778783 * snd_vx_create - constructor for struct vx_core779784 * @card: card instance···788783 *789784 * this function allocates the instance and prepare for the hardware790785 * initialization.786786+ *787787+ * The object is managed via devres, and will be automatically released.791788 *792789 * return the instance pointer if successful, NULL in error.793790 */···803796 if (snd_BUG_ON(!card || !hw || !ops))804797 return NULL;805798806806- chip = kzalloc(sizeof(*chip) + extra_size, GFP_KERNEL);807807- if (! chip)799799+ chip = devres_alloc(snd_vx_release, sizeof(*chip) + extra_size,800800+ GFP_KERNEL);801801+ if (!chip)808802 return NULL;809803 mutex_init(&chip->lock);810804 chip->irq = -1;