OSDN Git Service

nfc/fdp: Simplify the return expression of fdp_nci_open()
authorzuoqilin <zuoqilin@yulong.com>
Thu, 18 Mar 2021 13:36:40 +0000 (21:36 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Mar 2021 02:13:42 +0000 (19:13 -0700)
Simplify the return expression.

Signed-off-by: zuoqilin <zuoqilin@yulong.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/nfc/fdp/fdp.c

index 4dc7bd7..824f2da 100644 (file)
@@ -236,15 +236,12 @@ static int fdp_nci_send_patch(struct nci_dev *ndev, u8 conn_id, u8 type)
 
 static int fdp_nci_open(struct nci_dev *ndev)
 {
-       int r;
        struct fdp_nci_info *info = nci_get_drvdata(ndev);
        struct device *dev = &info->phy->i2c_dev->dev;
 
        dev_dbg(dev, "%s\n", __func__);
 
-       r = info->phy_ops->enable(info->phy);
-
-       return r;
+       return info->phy_ops->enable(info->phy);
 }
 
 static int fdp_nci_close(struct nci_dev *ndev)