[PATCH] UVC: deal with unnamed streams

From: Oliver Neukum
Date: Mon Feb 10 2020 - 09:10:36 EST


The pointer can be NULL

Signed-off-by: Oliver Neukum <oneukum@xxxxxxxx>
---
drivers/media/usb/uvc/uvc_driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 99883550375e..26558a89f2fe 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2069,7 +2069,8 @@ static int uvc_register_terms(struct uvc_device *dev,
stream = uvc_stream_by_id(dev, term->id);
if (stream == NULL) {
uvc_printk(KERN_INFO, "No streaming interface found "
- "for terminal %u.", term->id);
+ "for terminal %u.",
+ term->id ? term->id : "(Unnamed)");
continue;
}

--
2.16.4