Potential NULL dreference before check.
Picked up by Coverity check.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
/* FreeObject frees up a Object and puts it back on the free list */
static void yaffs_free_obj(struct yaffs_obj *obj)
{
/* FreeObject frees up a Object and puts it back on the free list */
static void yaffs_free_obj(struct yaffs_obj *obj)
{
- struct yaffs_dev *dev = obj->my_dev;
-
- yaffs_trace(YAFFS_TRACE_OS, "FreeObject %p inode %p",
- obj, obj->my_inode);
if (!obj) {
YBUG();
return;
}
if (!obj) {
YBUG();
return;
}
+ dev = obj->my_dev;
+ yaffs_trace(YAFFS_TRACE_OS, "FreeObject %p inode %p",
+ obj, obj->my_inode);
if (obj->parent)
YBUG();
if (!list_empty(&obj->siblings))
if (obj->parent)
YBUG();
if (!list_empty(&obj->siblings))