* [PATCH] dm: Drop redundant nonseekable_open() return check
@ 2026-07-03 2:09 phucduc.bui
0 siblings, 0 replies; only message in thread
From: phucduc.bui @ 2026-07-03 2:09 UTC (permalink / raw)
To: Alasdair Kergon, Mike Snitzer
Cc: Mikulas Patocka, Benjamin Marzinski, dm-devel, linux-kernel,
bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
nonseekable_open() never fails, so the error check is unnecessary.
Remove the dead error handling path.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
drivers/md/dm-ioctl.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index ac77dc0ca225..11574b1e2017 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -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)
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-03 2:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03 2:09 [PATCH] dm: Drop redundant nonseekable_open() return check phucduc.bui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox