From: Colin Ian King Date: Mon, 15 Apr 2024 10:19:28 +0000 (+0100) Subject: dax: remove redundant assignment to variable rc X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=41147b006be2174b825a54b0620ecf4cc7ec5c84;p=linux.git dax: remove redundant assignment to variable rc 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 Reviewed-by: Alison Schofield Reviewed-by: Dave Jiang Reviewed-by: Vishal Verma Link: https://lore.kernel.org/r/20240415101928.484143-1-colin.i.king@gmail.com Signed-off-by: Ira Weiny --- diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 018f81ec82ac0..6ec5db8013e89 100644 --- a/drivers/dax/bus.c +++ b/drivers/dax/bus.c @@ -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;