nfc: return if NFC is in shutdown state
Rakesh Goyal [Tue, 17 Sep 2013 20:50:46 +0000 (01:50 +0530)]
Bug 1362875
Change-Id: Ic5cac6b2e5899fb6eb63d873e567ee77bc8bc390
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: http://git-master/r/275969
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

drivers/nfc/bcm2079x-i2c.c

index 687900e..276bf3d 100644 (file)
@@ -162,6 +162,7 @@ static void change_client_addr(struct bcm2079x_dev *bcm2079x_dev, int addr)
                dev_info(&client->dev, "%s: discarding as \
                NFC in shutdown state\n", __func__);
                mutex_unlock(&bcm2079x_dev->read_mutex);
+               return;
        }
        ret = i2c_master_send(client, addr_data+offset,
                sizeof(addr_data)-offset);