On 18/07/19 6:05 AM, Akihiro TSUKADA wrote:
> Hi,
>
>> diff --git a/drivers/media/dvb-frontends/dvb-pll.c 
>> b/drivers/media/dvb-frontends/dvb-pll.c
>> index ba0c49107bd2..c850f1d69bce 100644
>> --- a/drivers/media/dvb-frontends/dvb-pll.c
>> +++ b/drivers/media/dvb-frontends/dvb-pll.c
>> @@ -788,6 +788,9 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend 
>> *fe, int pll_addr,
>>      int ret;
>>      const struct dvb_pll_desc *desc;
>>
>> +    if (dvb_pll_devcount > DVB_PLL_MAX - 1)
>> +            return NULL;
>> +
>>      b1 = kmalloc(1, GFP_KERNEL);
>>      if (!b1)
>>              return NULL;
>>
> Wouldn't it put a limit on the number of attachment of devices?
> I'm afraid that an user may repeatedly plugs in and off a device
> using this driver (for some reason), and finally gets an error.
>
> Since dvb_pll_devcount and "id" module parameter are just used
> for debugging purpose to override/force PLL type,
> removing them totally would be better, IMHO.

Hi,

Thanks for reviewing the patch.

Will it be better, if dvb_pll_devcount is decremented in dvb_pll_release(),  
instead of removing module params?

Regards,

Vandana.

>
> regards,
> Akihiro

Reply via email to