Skip to content

Instantly share code, notes, and snippets.

@b-rad-NDi
Created September 6, 2018 18:40
Show Gist options
  • Save b-rad-NDi/cddc90a138f10de3ba2aec575c648fa8 to your computer and use it in GitHub Desktop.
Save b-rad-NDi/cddc90a138f10de3ba2aec575c648fa8 to your computer and use it in GitHub Desktop.
au828 oops fix
From ee3b5f37446df3cef8b8c1791724426c6a74fcdc Mon Sep 17 00:00:00 2001
From: Brad Love <brad@nextdimension.cc>
Date: Thu, 6 Sep 2018 13:19:44 -0500
Subject: [PATCH] au0828: cannot kfree dev before usb disconnect
au0828_usb_disconnect uses dev. If dev is NULL then there is immediate oops.
Signed-off-by: Brad Love <brad@nextdimension.cc>
---
drivers/media/usb/au0828/au0828-core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
index cd363a2..257ae0d 100644
--- a/drivers/media/usb/au0828/au0828-core.c
+++ b/drivers/media/usb/au0828/au0828-core.c
@@ -629,7 +629,6 @@ static int au0828_usb_probe(struct usb_interface *interface,
pr_err("%s() au0282_dev_register failed to register on V4L2\n",
__func__);
mutex_unlock(&dev->lock);
- kfree(dev);
goto done;
}
--
2.7.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment