Hi kalle,

On Fri, Apr 26, 2019 at 8:55 PM Kalle Valo <[email protected]> wrote:
>
> Siva Rebbagondla <[email protected]> writes:
>
> > On Fri, Apr 26, 2019 at 8:28 PM Kalle Valo <[email protected]> wrote:
> >
> >> Julia Lawall <[email protected]> writes:
> >>
> >> > The ifs starting on line 766 can fail because id is NULL.
> >
> > I don't think id will be NULL here. id is coming from probe.
> > Is there any other opinions?.
>
> The code in question:
>
>         if (id && id->idProduct == RSI_USB_PID_9113) {
>                 rsi_dbg(INIT_ZONE, "%s: 9113 module detected\n", __func__);
>                 adapter->device_model = RSI_DEV_9113;
>         } else if (id && id->idProduct == RSI_USB_PID_9116) {
>                 rsi_dbg(INIT_ZONE, "%s: 9116 module detected\n", __func__);
>                 adapter->device_model = RSI_DEV_9116;
>         } else {
>                 rsi_dbg(ERR_ZONE, "%s: Unsupported RSI device id 0x%x\n",
>                         __func__, id->idProduct);
>                 goto err1;
>         }
>
> I think the fact that you are checking if id is NULL is confusing the
> static checkers. If it's never NULL why check for that anyway? So if
> it's guaranteed that id is never NULL (I didn't check that from USB
> core) I would recommend to remove the NULL checks from the driver.
Yes Kalle. I agree. I will make the change and send you for the review.

---
Siva Rebbagondla

Reply via email to