Skip to content

Commit

Permalink
Avoid Oops in rpi_touchscreen_dsi_probe by checking for bridge_i2c = …
Browse files Browse the repository at this point in the history
…NULL

Fixes raspberrypi#1948

Signed-off-by: Andreas Müller <[email protected]>
  • Loading branch information
schnitzeltony committed Apr 7, 2017
1 parent 3f53e78 commit 289dfb7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,9 @@ static int rpi_touchscreen_dsi_probe(struct mipi_dsi_device *dsi)

ts->bridge_i2c =
rpi_touchscreen_get_i2c(dev, "raspberrypi,touchscreen-bridge");
if (!ts->bridge_i2c)
return -ENODEV;

if (IS_ERR(ts->bridge_i2c)) {
ret = -EPROBE_DEFER;
return ret;
Expand Down

0 comments on commit 289dfb7

Please sign in to comment.