Skip to contentSkip to conversation

media: rc: ttusbir: fix inverted error logic

PATCH New Oliver Neukum 1 participant 1 message Apr 10

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: rc: ttusbir: fix inverted error logic

We have to report ENOMEM if no buffer is allocated. Typo dropped a "!". Restore it.

Fixes 50acaad3d202 ("media: rc: ttusbir: respect DMA coherency rules")
---
 drivers/media/rc/ttusbir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/rc/ttusbir.c +1 -1
index 3848ad3a6b85..db2f6698a6c0 100644
@@ -191,7 +191,7 @@ static int ttusbir_probe(struct usb_interface *intf,
 	tt = kzalloc_obj(*tt);
 	buffer = kzalloc(5, GFP_KERNEL);
 	rc = rc_allocate_device(RC_DRIVER_IR_RAW);
-	if (!tt || !rc || buffer) {
+	if (!tt || !rc || !buffer) {
 		ret = -ENOMEM;
 		goto out;
 	}
Signature · 1 line
2.53.0