[PATCH -next] libertas: fix error return code in if_cs_probe()

Dan Williams dcbw at redhat.com
Wed Oct 30 10:42:02 EDT 2013


On Wed, 2013-10-30 at 13:22 +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
> 
> Fix to return -ENODEV in the unknown model error handling
> case instead of 0, as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn>

Acked-by: Dan Williams <dcbw at redhat.com>

> ---
>  drivers/net/wireless/libertas/if_cs.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
> index ef8c98e..f499efc 100644
> --- a/drivers/net/wireless/libertas/if_cs.c
> +++ b/drivers/net/wireless/libertas/if_cs.c
> @@ -902,6 +902,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
>  	if (card->model == MODEL_UNKNOWN) {
>  		pr_err("unsupported manf_id 0x%04x / card_id 0x%04x\n",
>  		       p_dev->manf_id, p_dev->card_id);
> +		ret = -ENODEV;
>  		goto out2;
>  	}
>  
> 
> 
> _______________________________________________
> libertas-dev mailing list
> libertas-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libertas-dev





More information about the libertas-dev mailing list