mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-24 05:01:03 +02:00
SUNRPC: Ensure get_rpccred() and put_rpccred() can take NULL arguments
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
committed by
Anna Schumaker
parent
f538d0ba5b
commit
9a8f6b5ea2
@@ -202,7 +202,8 @@ char * rpcauth_stringify_acceptor(struct rpc_cred *);
|
||||
static inline
|
||||
struct rpc_cred * get_rpccred(struct rpc_cred *cred)
|
||||
{
|
||||
atomic_inc(&cred->cr_count);
|
||||
if (cred != NULL)
|
||||
atomic_inc(&cred->cr_count);
|
||||
return cred;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user