Pedro Lopez-Cabanillas wrote:
>
> El Mar 30 Jul 2002 15:09, Clemens Ladisch escribi�:
> > - if (port < 0)
> > + if (port < 0) {
> > + snd_printk(KERN_ERR "cannot create port (error code %d)\n",
>err);
> > return port;
>
> I think that you mean:
> snd_printk(KERN_ERR "cannot create port (error code %d)\n",
>port);
>
> Right? :)
Yes, thank you.
Here again the same patch, now correct. (I hope :-)
Index: usb/usbmidi.c
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/usb/usbmidi.c,v
retrieving revision 1.4
diff -u -r1.4 usbmidi.c
--- usb/usbmidi.c 5 Jul 2002 13:39:28 -0000 1.4
+++ usb/usbmidi.c 30 Jul 2002 16:33:28 -0000
@@ -834,8 +834,10 @@
port = snd_seq_event_port_attach(umidi->seq_client,
&port_callback,
cap, type, port_name);
- if (port < 0)
+ if (port < 0) {
+ snd_printk(KERN_ERR "cannot create port (error code %d)\n",
+port);
return port;
+ }
if (in)
umidi->endpoints[ep].in->ports[c].seq_port = port;
@@ -1084,6 +1086,8 @@
usb_ms_endpoint_descriptor_t* ms_ep;
int i, epidx;
+ memset(device_info, 0, sizeof(*device_info));
+
if (usb_device->descriptor.iManufacturer == 0 ||
usb_string(usb_device, usb_device->descriptor.iManufacturer,
device_info->vendor, sizeof(device_info->vendor)) < 0)
@@ -1180,12 +1184,15 @@
{
usbmidi_device_info_t device_info;
snd_card_t* card = NULL;
+ int err;
if (snd_usbmidi_get_device_info(device, ifnum, device_id,
&device_info) == 0) {
printk(KERN_INFO "snd-usb-midi: detected %s %s\n",
device_info.vendor, device_info.product);
- snd_usbmidi_card_create(device, &device_info, &card);
+ err = snd_usbmidi_card_create(device, &device_info, &card);
+ if (err < 0)
+ snd_printk(KERN_ERR "cannot create card (error code %d)\n",
+err);
}
return card;
}
-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code1
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel