diff options
author | Liu Shixin <liushixin2@huawei.com> | 2020-09-19 12:08:54 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-10-02 09:08:13 +0200 |
commit | 6aec345ed83a834ea796220741e5d8ca94299d6e (patch) | |
tree | 4f20f0f482cf1c12a77156138715b2c05b6debe9 /drivers/mtd/maps | |
parent | mtd: spear_smi: use for_each_child_of_node() macro (diff) | |
download | linux-6aec345ed83a834ea796220741e5d8ca94299d6e.tar.xz linux-6aec345ed83a834ea796220741e5d8ca94299d6e.zip |
mtd: maps: vmu-flash: simplify the return expression of probe_maple_vmu
Simplify the return expression.
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200919100854.1639267-1-liushixin2@huawei.com
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r-- | drivers/mtd/maps/vmu-flash.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/mtd/maps/vmu-flash.c b/drivers/mtd/maps/vmu-flash.c index 177bf134e189..588e82de581c 100644 --- a/drivers/mtd/maps/vmu-flash.c +++ b/drivers/mtd/maps/vmu-flash.c @@ -772,7 +772,6 @@ static void vmu_file_error(struct maple_device *mdev, void *recvbuf) static int probe_maple_vmu(struct device *dev) { - int error; struct maple_device *mdev = to_maple_dev(dev); struct maple_driver *mdrv = to_maple_driver(dev->driver); @@ -780,11 +779,7 @@ static int probe_maple_vmu(struct device *dev) mdev->fileerr_handler = vmu_file_error; mdev->driver = mdrv; - error = vmu_connect(mdev); - if (error) - return error; - - return 0; + return vmu_connect(mdev); } static int remove_maple_vmu(struct device *dev) |