diff mbox

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

Message ID 1469950979-19506-1-git-send-email-xypron.glpk@gmx.de
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Heinrich Schuchardt July 31, 2016, 7:42 a.m. UTC
For pdata == null the code leaves with an error.
There is need to check the condition again.

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

Comments

Sergei Shtylyov July 31, 2016, 10:03 a.m. UTC | #1
Hello.

On 7/31/2016 10:42 AM, Heinrich Schuchardt wrote:

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

    No need, you mean?

> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[...]

MBR, Sergei
diff mbox

Patch

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);