diff options
| author | John W. Linville <linville@tuxdriver.com> | 2014-03-13 14:21:43 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2014-03-13 14:21:43 -0400 |
| commit | 42775a34d23027b19e984956a539448f5e7ff075 (patch) | |
| tree | e344340c7f0aed4c8faf7534fabbc64607a8e784 /include/linux/tty.h | |
| parent | 433131ba03c511a84e1fda5669c70cf8b44702e1 (diff) | |
| parent | 4e3b3bcd81776527fa6f11624d68849de8c8802e (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts:
drivers/net/wireless/ath/ath9k/recv.c
Diffstat (limited to 'include/linux/tty.h')
| -rw-r--r-- | include/linux/tty.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index 90b4fdc8a61f..4781d7b27dd3 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -518,9 +518,9 @@ extern void tty_port_put(struct tty_port *port); static inline struct tty_port *tty_port_get(struct tty_port *port) { - if (port) - kref_get(&port->kref); - return port; + if (port && kref_get_unless_zero(&port->kref)) + return port; + return NULL; } /* If the cts flow control is enabled, return true. */ |
