Commit eaabc245 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Jarkko Sakkinen

tpm: st33zp24: remove pointless checks on probe

Remove tests for SPI device or I2C client to be non-NULL because
driver core will never call driver's probe method without having
a valid device structure.
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
parent f5264068
......@@ -106,12 +106,6 @@ static int st33zp24_i2c_probe(struct i2c_client *client,
{
struct st33zp24_i2c_phy *phy;
if (!client) {
pr_info("%s: i2c client is NULL. Device not accessible.\n",
__func__);
return -ENODEV;
}
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
dev_info(&client->dev, "client not i2c capable\n");
return -ENODEV;
......
......@@ -223,13 +223,6 @@ static int st33zp24_spi_probe(struct spi_device *dev)
{
struct st33zp24_spi_phy *phy;
/* Check SPI platform functionnalities */
if (!dev) {
pr_info("%s: dev is NULL. Device is not accessible.\n",
__func__);
return -ENODEV;
}
phy = devm_kzalloc(&dev->dev, sizeof(struct st33zp24_spi_phy),
GFP_KERNEL);
if (!phy)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment