9
0
Fork 0

fs: remove only once used variable

dev is used only once, so make the code a tiny bit simpler by
not using an extra variable but dereference it when needed directly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2012-02-14 19:53:10 +01:00
parent 336ad5ce68
commit b0c22c2f34
1 changed files with 2 additions and 4 deletions

View File

@ -718,7 +718,7 @@ int mount(const char *device, const char *fsname, const char *_path)
struct fs_driver_d *fs_drv = NULL, *f;
struct mtab_entry *entry;
struct fs_device_d *fsdev;
struct device_d *dev, *parent_device = NULL;
struct device_d *parent_device = NULL;
struct cdev *cdev = NULL;
int ret;
char *path = normalise_path(_path);
@ -789,12 +789,10 @@ int mount(const char *device, const char *fsname, const char *_path)
if (parent_device)
dev_add_child(parent_device, &fsdev->dev);
dev = &fsdev->dev;
/* add mtab entry */
entry = &fsdev->mtab;
entry->path = xstrdup(path);
entry->dev = dev;
entry->dev = &fsdev->dev;
entry->parent_device = parent_device;
list_add_tail(&entry->list, &mtab_list);