[9610][ERD] drivers: muic: fix prevent CID 237155
- Fix problem of dereference before null check.
- System comment:
1579 static irqreturn_t s2mu004_muic_detach_isr(int irq, void *data)
1580 {
1581 struct s2mu004_muic_data *muic_data = data;
/* deref_ptr: Directly dereferencing pointer muic_data. */
1582 struct muic_platform_data *muic_pdata = muic_data->pdata;
1583 struct muic_interface_t *muic_if = muic_data->if_data;
1584
/* CID 237155 (#1 of 1): Dereference before null check (REVERSE_INULL)
* check_after_deref: Null-checking muic_data suggests that it may be null,
* but it has already been dereferenced on all paths leading to the check.
*/
1585 if (muic_data == NULL || muic_pdata == NULL || muic_if == NULL) {
1586 pr_err("%s, data NULL\n", __func__);
1587 return IRQ_NONE;
1588 }
Change-Id: I6cb3128153c8a062fdd141a39abd87607ec29f15
Signed-off-by: Kim Taejeong <tj.kim@samsung.com>