Re: [RFC PATCH v2 07/22] ASoC: Add SOC USB APIs for adding an USB backend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





+void *snd_soc_usb_get_priv_data(struct device *usbdev)
+{
+	struct snd_soc_usb *ctx;
+
+	if (!usbdev)
+		return NULL;

How could usbdev ever be NULL?
The method is exported to public, valid check should be reasonable
as someone may call it by mistake


+
+	ctx = snd_soc_find_usb_ctx(usbdev);
+
+	return ctx ? ctx->priv_data : NULL;
+}
+EXPORT_SYMBOL_GPL(snd_soc_usb_get_priv_data);
+




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux