projects
/
platform
/
kernel
/
linux-3.10.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03d8bc6
)
usb: gadget: FunctionFS: dereference ffs_dev conditionally
author
Andrzej Pietrasiewicz
<andrzej.p@samsung.com>
Mon, 13 Jan 2014 15:41:22 +0000
(16:41 +0100)
committer
Marek Szyprowski
<m.szyprowski@samsung.com>
Thu, 15 May 2014 05:26:57 +0000
(07:26 +0200)
ffs_dev->ffs_release_dev_callback should be accessed only if ffs_dev
is not NULL.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
drivers/usb/gadget/f_fs.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/f_fs.c
b/drivers/usb/gadget/f_fs.c
index
7ede285
..
52fd0c1
100644
(file)
--- a/
drivers/usb/gadget/f_fs.c
+++ b/
drivers/usb/gadget/f_fs.c
@@
-2590,11
+2590,12
@@
static void ffs_release_dev(struct ffs_data *ffs_data)
ffs_dev_lock();
ffs_dev = ffs_data->private_data;
- if (ffs_dev)
+ if (ffs_dev)
{
ffs_dev->mounted = false;
-
- if (ffs_dev->ffs_release_dev_callback)
- ffs_dev->ffs_release_dev_callback(ffs_dev);
+
+ if (ffs_dev->ffs_release_dev_callback)
+ ffs_dev->ffs_release_dev_callback(ffs_dev);
+ }
ffs_dev_unlock();
}