Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752539AbdH3Rv6 (ORCPT ); Wed, 30 Aug 2017 13:51:58 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:34710 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751386AbdH3RtC (ORCPT ); Wed, 30 Aug 2017 13:49:02 -0400 From: Corentin Labbe To: andrew@lunn.ch, f.fainelli@gmail.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH 1/5] net: mdio-mux: Fix NULL Comparison style Date: Wed, 30 Aug 2017 19:46:47 +0200 Message-Id: <20170830174651.30325-2-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170830174651.30325-1-clabbe.montjoie@gmail.com> References: <20170830174651.30325-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 841 Lines: 31 This patch fix checkpatch warning about NULL Comparison style. Signed-off-by: Corentin Labbe --- drivers/net/phy/mdio-mux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/mdio-mux.c b/drivers/net/phy/mdio-mux.c index 942ceaf3fd3f..b18ad7082b88 100644 --- a/drivers/net/phy/mdio-mux.c +++ b/drivers/net/phy/mdio-mux.c @@ -120,7 +120,7 @@ int mdio_mux_init(struct device *dev, } pb = devm_kzalloc(dev, sizeof(*pb), GFP_KERNEL); - if (pb == NULL) { + if (!pb) { ret_val = -ENOMEM; goto err_pb_kz; } @@ -144,7 +144,7 @@ int mdio_mux_init(struct device *dev, } cb = devm_kzalloc(dev, sizeof(*cb), GFP_KERNEL); - if (cb == NULL) { + if (!cb) { dev_err(dev, "Error: Failed to allocate memory for child %pOF\n", child_bus_node); -- 2.13.5