Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1393954 > unrolled thread
| Started by | Daeseok Youn <daeseok.youn@gmail.com> |
|---|---|
| First post | 2016-05-04 07:20 +0200 |
| Last post | 2016-05-10 03:20 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/3] staging: dgnc: remove redundant NULL check in Daeseok Youn <daeseok.youn@gmail.com> - 2016-05-04 07:20 +0200
Re: [PATCH 1/3] staging: dgnc: remove redundant NULL check in Greg KH <gregkh@linuxfoundation.org> - 2016-05-09 14:10 +0200
Re: [PATCH 1/3] staging: dgnc: remove redundant NULL check in DaeSeok Youn <daeseok.youn@gmail.com> - 2016-05-10 03:20 +0200
| From | Daeseok Youn <daeseok.youn@gmail.com> |
|---|---|
| Date | 2016-05-04 07:20 +0200 |
| Subject | [PATCH 1/3] staging: dgnc: remove redundant NULL check in |
| Message-ID | <ruXo7-65g-7@gated-at.bofh.it> |
tty and ch are already checked for NULL
before calling dgnc_block_til_ready().
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
drivers/staging/dgnc/dgnc_tty.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 2cecdb0..d85d005 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -1172,17 +1172,12 @@ static int dgnc_block_til_ready(struct tty_struct *tty,
struct channel_t *ch)
{
int retval = 0;
- struct un_t *un = NULL;
+ struct un_t *un = tty->driver_data;
unsigned long flags;
uint old_flags = 0;
int sleep_on_un_flags = 0;
- if (!tty || tty->magic != TTY_MAGIC || !file || !ch ||
- ch->magic != DGNC_CHANNEL_MAGIC)
- return -ENXIO;
-
- un = tty->driver_data;
- if (!un || un->magic != DGNC_UNIT_MAGIC)
+ if (!file)
return -ENXIO;
spin_lock_irqsave(&ch->ch_lock, flags);
--
2.8.2
[toc] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-05-09 14:10 +0200 |
| Message-ID | <rwSaD-5og-33@gated-at.bofh.it> |
| In reply to | #1393954 |
On Wed, May 04, 2016 at 02:13:04PM +0900, Daeseok Youn wrote: > tty and ch are already checked for NULL > before calling dgnc_block_til_ready(). > > Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Your subject line doesn't make sense, please fix it up and resend. thanks, greg k-h
[toc] | [prev] | [next] | [standalone]
| From | DaeSeok Youn <daeseok.youn@gmail.com> |
|---|---|
| Date | 2016-05-10 03:20 +0200 |
| Message-ID | <rx4v8-yZ-17@gated-at.bofh.it> |
| In reply to | #1396989 |
2016-05-09 21:08 GMT+09:00 Greg KH <gregkh@linuxfoundation.org>: > On Wed, May 04, 2016 at 02:13:04PM +0900, Daeseok Youn wrote: >> tty and ch are already checked for NULL >> before calling dgnc_block_til_ready(). >> >> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> > > Your subject line doesn't make sense, please fix it up and resend. OK. I will resend this. thanks regards, Daeseok. > > thanks, > > greg k-h
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web