diff options
Diffstat (limited to 'drivers/misc/ti-st/st_kim.c')
-rw-r--r-- | drivers/misc/ti-st/st_kim.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index 5da93ee6f6be..38fd2f04c07e 100644 --- a/drivers/misc/ti-st/st_kim.c +++ b/drivers/misc/ti-st/st_kim.c | |||
@@ -245,9 +245,9 @@ void skip_change_remote_baud(unsigned char **ptr, long *len) | |||
245 | pr_err("invalid action after change remote baud command"); | 245 | pr_err("invalid action after change remote baud command"); |
246 | } else { | 246 | } else { |
247 | *ptr = *ptr + sizeof(struct bts_action) + | 247 | *ptr = *ptr + sizeof(struct bts_action) + |
248 | ((struct bts_action *)nxt_action)->size; | 248 | ((struct bts_action *)cur_action)->size; |
249 | *len = *len - (sizeof(struct bts_action) + | 249 | *len = *len - (sizeof(struct bts_action) + |
250 | ((struct bts_action *)nxt_action)->size); | 250 | ((struct bts_action *)cur_action)->size); |
251 | /* warn user on not commenting these in firmware */ | 251 | /* warn user on not commenting these in firmware */ |
252 | pr_warn("skipping the wait event of change remote baud"); | 252 | pr_warn("skipping the wait event of change remote baud"); |
253 | } | 253 | } |
@@ -604,6 +604,10 @@ void st_kim_ref(struct st_data_s **core_data, int id) | |||
604 | struct kim_data_s *kim_gdata; | 604 | struct kim_data_s *kim_gdata; |
605 | /* get kim_gdata reference from platform device */ | 605 | /* get kim_gdata reference from platform device */ |
606 | pdev = st_get_plat_device(id); | 606 | pdev = st_get_plat_device(id); |
607 | if (!pdev) { | ||
608 | *core_data = NULL; | ||
609 | return; | ||
610 | } | ||
607 | kim_gdata = dev_get_drvdata(&pdev->dev); | 611 | kim_gdata = dev_get_drvdata(&pdev->dev); |
608 | *core_data = kim_gdata->core_data; | 612 | *core_data = kim_gdata->core_data; |
609 | } | 613 | } |