[PATCH 07/32] fs: remove never-read initializer in mount_all()

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Sep 5 02:55:32 PDT 2022


list_for_each_entry will initialize cdev for each iteration, so the
initial assignment is never used, thus drop it.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 fs/fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fs.c b/fs/fs.c
index 620cd6597a63..14d5f7330457 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -1014,7 +1014,7 @@ void mount_all(void)
 		device_detect(dev);
 
 	for_each_block_device(bdev) {
-		struct cdev *cdev = &bdev->cdev;
+		struct cdev *cdev;
 
 		list_for_each_entry(cdev, &bdev->dev->cdevs, devices_list)
 			cdev_mount_default(cdev, NULL);
-- 
2.30.2




More information about the barebox mailing list