Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1723554

[PATCH 1/5] net: mdio-mux: Fix NULL Comparison style

From Corentin Labbe <clabbe.montjoie@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 1/5] net: mdio-mux: Fix NULL Comparison style
Date 2017-08-30 20:00 +0200
Message-ID <ukfrs-2W1-25@gated-at.bofh.it> (permalink)
References <ukfhM-2SU-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This patch fix checkpatch warning about NULL Comparison style.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] net: mdio-mux: Misc fix Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-08-30 19:50 +0200
  [PATCH 2/5] net: mdio-mux: Remove unnecessary 'out of memory' message Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-08-30 19:50 +0200
    Re: [PATCH 2/5] net: mdio-mux: Remove unnecessary 'out of memory'  message Andrew Lunn <andrew@lunn.ch> - 2017-08-30 20:50 +0200
  [PATCH 3/5] net: mdio-mux: printing driver version is useless Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-08-30 20:00 +0200
    Re: [PATCH 3/5] net: mdio-mux: printing driver version is useless Andrew Lunn <andrew@lunn.ch> - 2017-08-30 20:50 +0200
  [PATCH 4/5] net: mdio-mux-mmioreg: Can handle 8/16/32 bits registers Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-08-30 20:00 +0200
    Re: [PATCH 4/5] net: mdio-mux-mmioreg: Can handle 8/16/32 bits  registers Andrew Lunn <andrew@lunn.ch> - 2017-08-30 20:50 +0200
  [PATCH 1/5] net: mdio-mux: Fix NULL Comparison style Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-08-30 20:00 +0200
    Re: [PATCH 1/5] net: mdio-mux: Fix NULL Comparison style Andrew Lunn <andrew@lunn.ch> - 2017-08-30 20:50 +0200
  Re: [PATCH 0/5] net: mdio-mux: Misc fix Andrew Lunn <andrew@lunn.ch> - 2017-08-30 21:10 +0200
    Re: [PATCH 0/5] net: mdio-mux: Misc fix Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-09-01 10:40 +0200

csiph-web