[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191106212120.27983-18-wsa+renesas@sang-engineering.com>
Date: Wed, 6 Nov 2019 22:21:17 +0100
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
To: linux-media@...r.kernel.org
Cc: linux-i2c@...r.kernel.org,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH 17/17] media: v4l2-core: v4l2-i2c: convert to use i2c_new_client_device()
Use the new helper to bail out. It is more readable and in preparation
for another conversion.
Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
---
drivers/media/v4l2-core/v4l2-i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/v4l2-i2c.c b/drivers/media/v4l2-core/v4l2-i2c.c
index 5bf99e7c0c09..d85f5b1f5509 100644
--- a/drivers/media/v4l2-core/v4l2-i2c.c
+++ b/drivers/media/v4l2-core/v4l2-i2c.c
@@ -88,7 +88,7 @@ struct v4l2_subdev
* want to use the i2c device, so explicitly loading the module
* is the best alternative.
*/
- if (!client || !client->dev.driver)
+ if (!i2c_client_has_driver(client))
goto error;
/* Lock the module so we can safely get the v4l2_subdev pointer */
--
2.20.1
Powered by blists - more mailing lists