diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2020-09-30 09:20:05 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-10-12 16:34:19 +0200 |
commit | d5c47697a8f884d0ccc6c0958851a082d41b7a24 (patch) | |
tree | 35b7da0f46a9ff47ee1e96e6b119fbf73b6bafb3 /common | |
parent | ecf602fb0f00a3a31d8ece9c8ef97050249485c3 (diff) | |
download | barebox-d5c47697a8f884d0ccc6c0958851a082d41b7a24.tar.gz barebox-d5c47697a8f884d0ccc6c0958851a082d41b7a24.tar.xz |
blspec: fix dead assignment
cdev is assigned for each loop iteration and consumed inside.
The initial value is never read, so drop it.
Reported-by: clang-analyzer-10
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r-- | common/blspec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/blspec.c b/common/blspec.c index 9499d32477..a07343f427 100644 --- a/common/blspec.c +++ b/common/blspec.c @@ -766,7 +766,7 @@ int blspec_scan_devices(struct bootentries *bootentries) 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) { ret = blspec_scan_cdev(bootentries, cdev); |