Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp452421imm; Wed, 3 Oct 2018 20:11:47 -0700 (PDT) X-Google-Smtp-Source: ACcGV630pblI5KBvaZ1kyoI4QgcyKzorgU1bhjqwzA0nmB8dIvIN2kI/as3plZoxjWuXXFV3Tw0E X-Received: by 2002:a17:902:47c2:: with SMTP id d2-v6mr4515008plh.317.1538622707072; Wed, 03 Oct 2018 20:11:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538622707; cv=none; d=google.com; s=arc-20160816; b=oKYvhL5DQz6w+Y6vIhHSAhVVnb/SK2kH/WJ5SH9ZaKrvg7KR/xcP7BvLZwXL4xqZrm lBOKhsy8B5vRACMHuXVFrP0Wac6hNU8Hq6l7Xong82q29Z68zG858H5gjtSb8XND0Q5a Z6QmPkcqxZ2xfIVIshi8wrAjEmYdnRr2wCyhCfhs59jS58N6Lzz4NL8ixkzB7ZY7kG/0 vxYRNox3bV+V9/cnYYq5Z+W05CMthBpGpowk7nwK+79V8e6QygQmTZ5D4zmds8wDqHtS YTszLqrWPnTY8Cm1W6U60zOJ/oN+AGqJ9or/rb0S5m74/nOb2PhrJH1G/0spLWqjMoMT 48xQ== 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=UnzEO+zCzMtBUtq/+LFcLuxOXJN2eZbnIMev8v9qSOo=; b=ptrIZx/s1iVKFZmXhgYZxOmRdB4FuV7pWtw+w71x4maH/SAWGvviPz2Mj+5L4gS+n4 A0l3ZLFSHM252face6qFSL4rKIYUaWE96uU1TR/qXi8p7D08gXjOQ+mDrVxoIh92CUfb 3mJCw4qhFIi97eSTLqSX1Z04E3QwEFGexG3J+468LkJYMmNpLPwHYkc1Ir/1UTF3zrDU 7jzz0PUX4MyuVabZi7NQPeYrmYNaXNFl8DKf2rT0lgQWH+1QkPRH2DC3oLsoVR2Xftyu OyDETEVnETj+YgJjEAbj5DiiygO5hqejRG94GYbolPPed2NHIg2w8Jv1d4vV9v+pso4A hMMg== 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 r25-v6si3766858pgl.146.2018.10.03.20.11.32; Wed, 03 Oct 2018 20:11:47 -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 S1727336AbeJDKAY (ORCPT + 99 others); Thu, 4 Oct 2018 06:00:24 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:60518 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726752AbeJDKAY (ORCPT ); Thu, 4 Oct 2018 06:00:24 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id ADE04967F7EDC; Thu, 4 Oct 2018 11:09:12 +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, 4 Oct 2018 11:09:09 +0800 From: zhong jiang To: CC: , , Subject: [PATCHv2] misc: cxl: delete possible null pointer dereference Date: Thu, 4 Oct 2018 10:56:48 +0800 Message-ID: <1538621808-28080-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 It is safe to dereference an object below a NULL test. For the sake of debugging. Just delete the call of possible null pointer dereference. Signed-off-by: zhong jiang --- drivers/misc/cxl/guest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c index 3bc0c15..472e8db 100644 --- a/drivers/misc/cxl/guest.c +++ b/drivers/misc/cxl/guest.c @@ -1018,7 +1018,7 @@ int cxl_guest_init_afu(struct cxl *adapter, int slice, struct device_node *afu_n void cxl_guest_remove_afu(struct cxl_afu *afu) { - pr_devel("in %s - AFU(%d)\n", __func__, afu->slice); + pr_devel("in %s\n", __func__); if (!afu) return; -- 1.7.12.4