[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230815204141.51972-1-atulpant.linux@gmail.com>
Date: Wed, 16 Aug 2023 02:11:41 +0530
From: Atul Kumar Pant <atulpant.linux@...il.com>
To: gregkh@...uxfoundation.org, richard.leitner@...ux.dev,
wsa+renesas@...g-engineering.com, mhocko@...e.com,
surenb@...gle.com
Cc: Atul Kumar Pant <atulpant.linux@...il.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
shuah@...nel.org
Subject: [PATCH v1] drivers: usb: Removes use of assignment in if condition
This patch fixes following checkpatch.pl issue:
ERROR: do not use assignment in if condition
Signed-off-by: Atul Kumar Pant <atulpant.linux@...il.com>
---
drivers/usb/core/devio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index e501a03d6c70..56899fed6bd4 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -2333,9 +2333,10 @@ static int proc_ioctl(struct usb_dev_state *ps, struct usbdevfs_ioctl *ctl)
}
}
+ intf = usb_ifnum_to_if(ps->dev, ctl->ifno);
if (ps->dev->state != USB_STATE_CONFIGURED)
retval = -EHOSTUNREACH;
- else if (!(intf = usb_ifnum_to_if(ps->dev, ctl->ifno)))
+ else if (!intf)
retval = -EINVAL;
else switch (ctl->ioctl_code) {
--
2.25.1
Powered by blists - more mailing lists