linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] char: lp: ensure that index has not exceeded LP_NO
@ 2022-05-14 21:14 Shreenidhi Shedi
  2022-05-14 21:14 ` [PATCH 2/5] char: lp: remove redundant initialization of err Shreenidhi Shedi
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Shreenidhi Shedi @ 2022-05-14 21:14 UTC (permalink / raw)
  To: arnd, gregkh, paul, eparis
  Cc: linux-kernel, linux-audit, yesshedi, Shreenidhi Shedi

Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
---
 drivers/char/lp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index 0e22e3b0a04e..d474d02b6c7f 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -972,7 +972,7 @@ static void lp_attach(struct parport *port)
 			if (port_num[i] == -1)
 				break;
 
-		if (!lp_register(i, port))
+		if (i < LP_NO && !lp_register(i, port))
 			lp_count++;
 		break;
 
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-05-15 23:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-14 21:14 [PATCH 1/5] char: lp: ensure that index has not exceeded LP_NO Shreenidhi Shedi
2022-05-14 21:14 ` [PATCH 2/5] char: lp: remove redundant initialization of err Shreenidhi Shedi
2022-05-14 21:53   ` Greg KH
2022-05-14 21:14 ` [PATCH 3/5] char: lp: fix most of checkspec.pl warnings & errors Shreenidhi Shedi
2022-05-14 21:53   ` Greg KH
2022-05-14 21:14 ` [PATCH 4/5] audit: remove redundant data_len check Shreenidhi Shedi
2022-05-14 21:54   ` Greg KH
2022-05-15 23:30   ` Paul Moore
2022-05-14 21:14 ` [PATCH 5/5] audit: fix most of the checkspec.pl warnnings & errors Shreenidhi Shedi
2022-05-14 21:54   ` Greg KH
2022-05-14 21:52 ` [PATCH 1/5] char: lp: ensure that index has not exceeded LP_NO Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).