diff options
| author | 2017-08-04 16:49:38 +0200 | |
|---|---|---|
| committer | 2017-08-04 16:50:18 +0200 | |
| commit | 74be62c7cefbf320e0605f3da6639ef80448ff00 (patch) | |
| tree | ea45fa2e0b343b792a03a66058b26a8d3e736787 /tools/include/linux/err.h | |
| parent | ALSA: hda: constify pci_device_id. (diff) | |
| parent | Merge tag 'asoc-fix-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus (diff) | |
Merge branch 'for-linus' into for-next
Back-merge 4.13-rc devel branch for later development.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'tools/include/linux/err.h')
| -rw-r--r-- | tools/include/linux/err.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/include/linux/err.h b/tools/include/linux/err.h index bdc3dd8131d4..abf0478a8fb2 100644 --- a/tools/include/linux/err.h +++ b/tools/include/linux/err.h @@ -46,4 +46,9 @@ static inline bool __must_check IS_ERR(__force const void *ptr) return IS_ERR_VALUE((unsigned long)ptr); } +static inline bool __must_check IS_ERR_OR_NULL(__force const void *ptr) +{ + return unlikely(!ptr) || IS_ERR_VALUE((unsigned long)ptr); +} + #endif /* _LINUX_ERR_H */ |
