From 080bb5541bc1eabcde3048abd2c516945fc3d155 Mon Sep 17 00:00:00 2001 From: Mike Isely Date: Fri, 6 Mar 2009 23:58:15 -0300 Subject: [PATCH] --- yaml --- r: 138270 b: refs/heads/master c: 446dfdc6cc62890098a1b92a4a84019a34dce0cc h: refs/heads/master v: v3 --- [refs] | 2 +- .../drivers/media/video/pvrusb2/pvrusb2-hdw.c | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 93148af8fd34..07c5c6f0402a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 15b474423f0642e6ff78f1963b816155e80fc932 +refs/heads/master: 446dfdc6cc62890098a1b92a4a84019a34dce0cc diff --git a/trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 0e0d086bb278..c764f360a774 100644 --- a/trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -2020,17 +2020,26 @@ static void pvr2_hdw_load_subdev(struct pvr2_hdw *hdw, i2caddr); } + if (!sd) { + pvr2_trace(PVR2_TRACE_ERROR_LEGS, + "Module ID %u for device %s failed to load" + " (this is probably a bad thing...)", + mid, hdw->hdw_desc->description); + return; + } + + /* Tag this sub-device instance with the module ID we know about. + In other places we'll use that tag to determine if the instance + requires special handling. */ + sd->grp_id = mid; + /* If we have both old and new i2c layers enabled, make sure that old layer isn't also tracking this module. This is a debugging aid, in normal situations there's no reason for both mechanisms to be enabled. */ pvr2_i2c_untrack_subdev(hdw, sd); + pvr2_trace(PVR2_TRACE_INIT, "Attached sub-driver %s", fname); - // ????? - /* Based on module ID, we should remember subdev pointers - so that we can send certain custom commands where - needed. */ - // ????? }