* [PATCH] Isimodem: Crash while setting SCA
@ 2011-03-11 12:49 ext-arun.1.ravindran
2011-03-11 19:59 ` Denis Kenzior
0 siblings, 1 reply; 3+ messages in thread
From: ext-arun.1.ravindran @ 2011-03-11 12:49 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 568 bytes --]
From: Arun Ravindran <ext-arun.1.ravindran@nokia.com>
---
drivers/isimodem/sms.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/isimodem/sms.c b/drivers/isimodem/sms.c
index 957b342..c90c06d 100644
--- a/drivers/isimodem/sms.c
+++ b/drivers/isimodem/sms.c
@@ -292,7 +292,7 @@ static void isi_sca_set(struct ofono_sms *sms,
{ &sd->params, sizeof(sd->params) },
};
- if (cbd == NULL || sd == NULL)
+ if (cbd == NULL || sd == NULL || sd->sim == NULL)
goto error;
bcd = sd->params.sca;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] Isimodem: Crash while setting SCA
2011-03-11 12:49 [PATCH] Isimodem: Crash while setting SCA ext-arun.1.ravindran
@ 2011-03-11 19:59 ` Denis Kenzior
2011-03-14 11:49 ` Aki Niemi
0 siblings, 1 reply; 3+ messages in thread
From: Denis Kenzior @ 2011-03-11 19:59 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 836 bytes --]
Hi Arun,
On 03/11/2011 06:49 AM, ext-arun.1.ravindran(a)nokia.com wrote:
> From: Arun Ravindran <ext-arun.1.ravindran@nokia.com>
>
> ---
> drivers/isimodem/sms.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
I applied the patch, however...
> diff --git a/drivers/isimodem/sms.c b/drivers/isimodem/sms.c
> index 957b342..c90c06d 100644
> --- a/drivers/isimodem/sms.c
> +++ b/drivers/isimodem/sms.c
> @@ -292,7 +292,7 @@ static void isi_sca_set(struct ofono_sms *sms,
> { &sd->params, sizeof(sd->params) },
> };
>
> - if (cbd == NULL || sd == NULL)
> + if (cbd == NULL || sd == NULL || sd->sim == NULL)
The check for sd == NULL is too late since sd->params is being used up
above for initialization of iov...
> goto error;
>
> bcd = sd->params.sca;
Regards,
-Denis
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] Isimodem: Crash while setting SCA
2011-03-11 19:59 ` Denis Kenzior
@ 2011-03-14 11:49 ` Aki Niemi
0 siblings, 0 replies; 3+ messages in thread
From: Aki Niemi @ 2011-03-14 11:49 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 799 bytes --]
Hi Denis,
2011/3/11 Denis Kenzior <denkenz@gmail.com>:
>> diff --git a/drivers/isimodem/sms.c b/drivers/isimodem/sms.c
>> index 957b342..c90c06d 100644
>> --- a/drivers/isimodem/sms.c
>> +++ b/drivers/isimodem/sms.c
>> @@ -292,7 +292,7 @@ static void isi_sca_set(struct ofono_sms *sms,
>> { &sd->params, sizeof(sd->params) },
>> };
>>
>> - if (cbd == NULL || sd == NULL)
>> + if (cbd == NULL || sd == NULL || sd->sim == NULL)
>
> The check for sd == NULL is too late since sd->params is being used up
> above for initialization of iov...
That's right. However, the only way for sd == NULL would be that core
first called remove() and then sca_set(), which should not happen.
So I think I will just remove that check.
Cheers,
Aki
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-14 11:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-11 12:49 [PATCH] Isimodem: Crash while setting SCA ext-arun.1.ravindran
2011-03-11 19:59 ` Denis Kenzior
2011-03-14 11:49 ` Aki Niemi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.