dax: remove redundant assignment to variable rc
authorColin Ian King <colin.i.king@gmail.com>
Mon, 15 Apr 2024 10:19:28 +0000 (11:19 +0100)
committerIra Weiny <ira.weiny@intel.com>
Thu, 25 Apr 2024 21:11:11 +0000 (14:11 -0700)
The variable rc is being assigned an value and then is being re-assigned
a new value in the next statement. The assignment is redundant and can
be removed.

Cleans up clang scan build warning:
drivers/dax/bus.c:1207:2: warning: Value stored to 'rc' is never
read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Link: https://lore.kernel.org/r/20240415101928.484143-1-colin.i.king@gmail.com
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
drivers/dax/bus.c

index 018f81ec82ac05d0215c17564913ee97ce557aeb..6ec5db8013e893f1977dabdafd4da46a1b354b06 100644 (file)
@@ -1204,7 +1204,6 @@ static ssize_t mapping_store(struct device *dev, struct device_attribute *attr,
        if (rc)
                return rc;
 
-       rc = -ENXIO;
        rc = down_write_killable(&dax_region_rwsem);
        if (rc)
                return rc;