[alsa-devel] [PATCH] ALSA: snd-usb-caiaq: initialize card pointer
Daniel Mack
zonque at gmail.com
Wed Jun 27 09:57:18 CEST 2012
ping
On 18.06.2012 21:16, Daniel Mack wrote:
> Fixes the following warning:
>
> CC [M] sound/usb/caiaq/device.o
> sound/usb/caiaq/device.c: In function ‘snd_probe’:
> sound/usb/caiaq/device.c:500:16: warning: ‘card’ may be used
> uninitialized in this function [-Wmaybe-uninitialized]
>
> Signed-off-by: Daniel Mack <zonque at gmail.com>
> ---
> sound/usb/caiaq/device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/usb/caiaq/device.c b/sound/usb/caiaq/device.c
> index 64aed43..7da0d0a 100644
> --- a/sound/usb/caiaq/device.c
> +++ b/sound/usb/caiaq/device.c
> @@ -485,7 +485,7 @@ static int __devinit snd_probe(struct usb_interface *intf,
> const struct usb_device_id *id)
> {
> int ret;
> - struct snd_card *card;
> + struct snd_card *card = NULL;
> struct usb_device *device = interface_to_usbdev(intf);
>
> ret = create_card(device, intf, &card);
>
More information about the Alsa-devel
mailing list