Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934052AbaGPFTA (ORCPT ); Wed, 16 Jul 2014 01:19:00 -0400 Received: from mail-pd0-f171.google.com ([209.85.192.171]:50136 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754973AbaGPFS5 (ORCPT ); Wed, 16 Jul 2014 01:18:57 -0400 From: varkabhadram@gmail.com To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, davem@davemloft.net, Varka Bhadram Subject: [PATCH net-next] netlink: fix in netlink_filter_tap Date: Wed, 16 Jul 2014 10:47:24 +0530 Message-Id: <1405487844-25969-1-git-send-email-varkabhadram@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Varka Bhadram Remove the bool variable 'pass'. Return the true/false directly. Signed-off-by: Varka Bhadram --- net/netlink/af_netlink.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index e8c9f97..5dd8193 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -170,7 +170,6 @@ EXPORT_SYMBOL_GPL(netlink_remove_tap); static bool netlink_filter_tap(const struct sk_buff *skb) { struct sock *sk = skb->sk; - bool pass = false; /* We take the more conservative approach and * whitelist socket protocols that may pass. @@ -184,11 +183,10 @@ static bool netlink_filter_tap(const struct sk_buff *skb) case NETLINK_FIB_LOOKUP: case NETLINK_NETFILTER: case NETLINK_GENERIC: - pass = true; - break; + return true; } - return pass; + return false; } static int __netlink_deliver_tap_skb(struct sk_buff *skb, -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/