From: Chuck Lever Date: Sat, 6 Dec 2008 00:03:01 +0000 (-0500) Subject: NSM: Remove NULL pointer check from nsm_find() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bc1cc6c4e476b60df48227165990c87a22db6bb7;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git NSM: Remove NULL pointer check from nsm_find() The nsm_find() function should never be called with a NULL IP address pointer. If it is, that's a bug. Signed-off-by: Chuck Lever Signed-off-by: J. Bruce Fields --- diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c index 38255455563d..0a066a13478e 100644 --- a/fs/lockd/mon.c +++ b/fs/lockd/mon.c @@ -224,9 +224,6 @@ struct nsm_handle *nsm_find(const struct sockaddr *sap, const size_t salen, struct nsm_handle *nsm = NULL; struct nsm_handle *pos; - if (!sap) - return NULL; - if (hostname && memchr(hostname, '/', hostname_len) != NULL) { if (printk_ratelimit()) { printk(KERN_WARNING "Invalid hostname \"%.*s\" "