Skip to contentSkip to conversation

dm: Drop redundant nonseekable_open() return check

PATCH New [email protected] 1 participant 1 message Jul 3 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm: Drop redundant nonseekable_open() return check

From: bui duc phuc <[email protected]>

nonseekable_open() never fails, so the error check is unnecessary. Remove the dead error handling path.

---
 drivers/md/dm-ioctl.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/md/dm-ioctl.c +1 -4
index ac77dc0ca225..11574b1e2017 100644
@@ -2273,12 +2273,9 @@ static long dm_compat_ctl_ioctl(struct file *file, uint command, ulong u)
 
 static int dm_open(struct inode *inode, struct file *filp)
 {
-	int r;
 	struct dm_file *priv;
 
-	r = nonseekable_open(inode, filp);
-	if (unlikely(r))
-		return r;
+	nonseekable_open(inode, filp);
 
 	priv = filp->private_data = kmalloc_obj(struct dm_file);
 	if (!priv)
Signature · 1 line
2.43.0