From: Corentin Labbe Date: Fri, 1 Sep 2017 11:56:00 +0000 (+0200) Subject: net: mdio-mux: Fix NULL Comparison style X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2d00cd859c79fb477ead232241808e02b6f468b3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git net: mdio-mux: Fix NULL Comparison style This patch fix checkpatch warning about NULL Comparison style. Signed-off-by: Corentin Labbe Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- 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);