]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/err.h
drbd: Allow online resizing of DRBD devices while peer not reachable (needs to be...
[karo-tx-linux.git] / include / linux / err.h
index ec87f3142bf30940c31911e71e6638d749de8f04..1b12642636c7a121f3a3797676cf8d4746ca13a9 100644 (file)
@@ -34,6 +34,11 @@ static inline long IS_ERR(const void *ptr)
        return IS_ERR_VALUE((unsigned long)ptr);
 }
 
+static inline long IS_ERR_OR_NULL(const void *ptr)
+{
+       return !ptr || IS_ERR_VALUE((unsigned long)ptr);
+}
+
 /**
  * ERR_CAST - Explicitly cast an error-valued pointer to another pointer type
  * @ptr: The pointer to cast.