]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: rc: ttusbir: fix inverted error logic
authorOliver Neukum <oneukum@suse.com>
Fri, 10 Apr 2026 21:03:09 +0000 (23:03 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 4 May 2026 06:33:39 +0000 (08:33 +0200)
We have to report ENOMEM if no buffer is allocated.
Typo dropped a "!". Restore it.

Fixes: 50acaad3d202 ("media: rc: ttusbir: respect DMA coherency rules")
Cc: stable@vger.kernel.org
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/rc/ttusbir.c

index 3848ad3a6b85f10826d6eb5634cf403026bd1511..db2f6698a6c0697bc726d37016cc92019a4204a4 100644 (file)
@@ -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;
        }