From: Liu Shixin Date: Sat, 19 Sep 2020 10:08:54 +0000 (+0800) Subject: mtd: maps: vmu-flash: simplify the return expression of probe_maple_vmu X-Git-Tag: v5.15~2642^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6aec345ed83a834ea796220741e5d8ca94299d6e;p=platform%2Fkernel%2Flinux-starfive.git mtd: maps: vmu-flash: simplify the return expression of probe_maple_vmu Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200919100854.1639267-1-liushixin2@huawei.com --- diff --git a/drivers/mtd/maps/vmu-flash.c b/drivers/mtd/maps/vmu-flash.c index 177bf13..588e82d 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)