Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* [PATCH] via-camera: check viafb_find_i2c_adapter() result to NULL
@ 2011-01-04 11:42 Dzianis Kahanovich
  0 siblings, 0 replies; only message in thread
From: Dzianis Kahanovich @ 2011-01-04 11:42 UTC (permalink / raw)
  To: linux-fbdev

If viafb_find_i2c_adapter() patch still useful - via-camera.c must be fixed too.

Signed-off-by: Dzianis Kahanovich <mahatma@eu.by>
---
--- b/drivers/media/video/via-camera.c	2011-01-04 13:08:18.000000000 +0200
+++ c/drivers/media/video/via-camera.c	2011-01-04 13:35:45.000000000 +0200
@@ -1344,8 +1344,9 @@ static __devinit int viacam_probe(struct
 	 * is OLPC-specific.  0x42 assumption is ov7670-specific.
 	 */
 	sensor_adapter = viafb_find_i2c_adapter(VIA_PORT_31);
-	cam->sensor = v4l2_i2c_new_subdev(&cam->v4l2_dev, sensor_adapter,
-			"ov7670", 0x42 >> 1, NULL);
+	if (sensor_adapter != NULL)
+		cam->sensor = v4l2_i2c_new_subdev(&cam->v4l2_dev,
+			sensor_adapter, "ov7670", 0x42 >> 1, NULL);
 	if (cam->sensor = NULL) {
 		dev_err(&pdev->dev, "Unable to find the sensor!\n");
 		ret = -ENODEV;
--

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-04 11:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-04 11:42 [PATCH] via-camera: check viafb_find_i2c_adapter() result to NULL Dzianis Kahanovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox