Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2093858imm; Thu, 20 Sep 2018 07:42:03 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYiPVMVsBuPeM2gsnEFC7au87aR2shbigmi4vvXy5CxmLC1UzQU90XsAJFg6y2rpg5Gi/lD X-Received: by 2002:a63:5845:: with SMTP id i5-v6mr37243562pgm.272.1537454523570; Thu, 20 Sep 2018 07:42:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537454523; cv=none; d=google.com; s=arc-20160816; b=d9IyAf1fNjx+xqXRvgDOmUCatNeqA8J0infoYB5iAYfq/6uJzJW2bNGlhnJ5aSHwTI oFsPHjQJHobSGzxuubb7aQNAiTfPd0xdptk+Ps5cRSNc8OlY3wMQJMKfknEP0NFOjjwG HH8HRzGZcfV+X43v1QKj6w2vFqTpt5tDK9ITp5C4C4ukct1Tk6MAg/pNxE86BPkXjUV2 11G9e+VlN9VhG0HFjufpCQUgy0LhbjBbHJ3auBE6GrVfGc6T23/2sUYQbf1R9UGDeWXc zYOSHMW2Vp2wQNPQ5WY8Zuseg7nAEX/d/jsLRSUN+YdKrtRIJGyHnYgQdczya0HI+mvS PSbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=2LU+lLY0MOQtpnSg0UcDBXcQqOI3OpHdxKGrxWwtg7k=; b=J4Nq/r/eGWMy76PAOkbHe6uiXNA7KuIEW7yVeEDzwVPzcjGMsSsLK3B+RegUVYXvSu z4BKsYwvrwFYdUExH3d8FWu440ji1vr017qT4o/pI0XMlWSFi87jgQZzUiACJ4xDPeJl hNDqIsiNdJb0F1yytFSCIqaWsqg1pkN5DzxqDVsEkmPs113ACwUEgZE3YibJ/Ogo4s30 pnjUCTQHiEGDaZIXkucq9CITwNxQboeO7UDc0XdfRdhEM2hFcST6BetRmX3uy+0cl6Tk xWZzoT4QFppKKIaxwNiexS/LcmsGdUnC2PsB6xJwfgScm/Zv1cqtk5VMhyAkVXfWi+3D vcow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n3-v6si23651486pgh.359.2018.09.20.07.41.47; Thu, 20 Sep 2018 07:42:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732726AbeITUYJ (ORCPT + 99 others); Thu, 20 Sep 2018 16:24:09 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13084 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730984AbeITUYJ (ORCPT ); Thu, 20 Sep 2018 16:24:09 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 468834D0B7B55; Thu, 20 Sep 2018 22:39:54 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.399.0; Thu, 20 Sep 2018 22:39:50 +0800 From: zhong jiang To: CC: , , , , Subject: [PATCH] mISDN: remove redundant null pointer check before kfree_skb Date: Thu, 20 Sep 2018 22:27:28 +0800 Message-ID: <1537453648-54132-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kfree_skb has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree_skb. Signed-off-by: zhong jiang --- drivers/isdn/mISDN/socket.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c index 18c0a12..15d3ca3 100644 --- a/drivers/isdn/mISDN/socket.c +++ b/drivers/isdn/mISDN/socket.c @@ -236,8 +236,7 @@ static void mISDN_sock_unlink(struct mISDN_sock_list *l, struct sock *sk) } done: - if (skb) - kfree_skb(skb); + kfree_skb(skb); release_sock(sk); return err; } -- 1.7.12.4