[PATCH 1/1] dsa: b53: remove redundant if

From: Heinrich Schuchardt
Date: Sun Jul 31 2016 - 03:56:00 EST


For pdata == null the code leaves with an error.
There is need to check the condition again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@xxxxxx>
---
drivers/net/dsa/b53/b53_mmap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c
index 21f1068..77ffc43 100644
--- a/drivers/net/dsa/b53/b53_mmap.c
+++ b/drivers/net/dsa/b53/b53_mmap.c
@@ -233,8 +233,7 @@ static int b53_mmap_probe(struct platform_device *pdev)
if (!dev)
return -ENOMEM;

- if (pdata)
- dev->pdata = pdata;
+ dev->pdata = pdata;

platform_set_drvdata(pdev, dev);

--
2.8.1