File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -107,11 +107,15 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c,
107
107
if (num == 0 )
108
108
return num ;
109
109
110
+ ret = pm_runtime_resume_and_get (& hdmi -> pdev -> dev );
111
+ if (ret )
112
+ return ret ;
113
+
110
114
init_ddc (hdmi_i2c );
111
115
112
116
ret = ddc_clear_irq (hdmi_i2c );
113
117
if (ret )
114
- return ret ;
118
+ goto fail ;
115
119
116
120
for (i = 0 ; i < num ; i ++ ) {
117
121
struct i2c_msg * p = & msgs [i ];
@@ -169,7 +173,7 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c,
169
173
hdmi_read (hdmi , REG_HDMI_DDC_SW_STATUS ),
170
174
hdmi_read (hdmi , REG_HDMI_DDC_HW_STATUS ),
171
175
hdmi_read (hdmi , REG_HDMI_DDC_INT_CTRL ));
172
- return ret ;
176
+ goto fail ;
173
177
}
174
178
175
179
ddc_status = hdmi_read (hdmi , REG_HDMI_DDC_SW_STATUS );
@@ -202,7 +206,13 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c,
202
206
}
203
207
}
204
208
209
+ pm_runtime_put (& hdmi -> pdev -> dev );
210
+
205
211
return i ;
212
+
213
+ fail :
214
+ pm_runtime_put (& hdmi -> pdev -> dev );
215
+ return ret ;
206
216
}
207
217
208
218
static u32 msm_hdmi_i2c_func (struct i2c_adapter * adapter )
You can’t perform that action at this time.
0 commit comments