Skip to content

Commit 6aec345

Browse files
Liu Shixinmiquelraynal
authored andcommitted
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
1 parent 670c898 commit 6aec345

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

drivers/mtd/maps/vmu-flash.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -772,19 +772,14 @@ static void vmu_file_error(struct maple_device *mdev, void *recvbuf)
772772

773773
static int probe_maple_vmu(struct device *dev)
774774
{
775-
int error;
776775
struct maple_device *mdev = to_maple_dev(dev);
777776
struct maple_driver *mdrv = to_maple_driver(dev->driver);
778777

779778
mdev->can_unload = vmu_can_unload;
780779
mdev->fileerr_handler = vmu_file_error;
781780
mdev->driver = mdrv;
782781

783-
error = vmu_connect(mdev);
784-
if (error)
785-
return error;
786-
787-
return 0;
782+
return vmu_connect(mdev);
788783
}
789784

790785
static int remove_maple_vmu(struct device *dev)

0 commit comments

Comments
 (0)