ref: 1b4ee511b69076d86763cbeac49865abbcef31ca
parent: 7b5b4afc6c106c01497196bdb065d5521f0de6f5
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Feb 23 13:13:00 EST 2022
nusb/cam: fix mistake (nil vs -1)
--- a/sys/src/cmd/nusb/cam/video.c
+++ b/sys/src/cmd/nusb/cam/video.c
@@ -278,7 +278,7 @@
if(usbcmd(d, 0x21, SET_CUR, VS_COMMIT_CONTROL << 8, c->iface->id, (uchar *) &c->pc, sizeof(ProbeControl)) < sizeof(ProbeControl)) goto err;
e = selbw(c, &c->pc, d->usb->ep[c->hdr->bEndpointAddress & Epmax]);
if(e == nil || setalt(c->dev, e->iface) < 0)
- return nil;
+ return -1;
c->ep = openep(d, e);
if(c->ep == nil){
setalt(d, c->iface);
--
⑨