From patchwork Wed Oct 30 05:22:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 3113031 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AC04E9F3E2 for ; Wed, 30 Oct 2013 05:22:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C3D18201F4 for ; Wed, 30 Oct 2013 05:22:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E364B201E9 for ; Wed, 30 Oct 2013 05:22:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750836Ab3J3FWg (ORCPT ); Wed, 30 Oct 2013 01:22:36 -0400 Received: from mail-bk0-f54.google.com ([209.85.214.54]:38314 "EHLO mail-bk0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750709Ab3J3FWf (ORCPT ); Wed, 30 Oct 2013 01:22:35 -0400 Received: by mail-bk0-f54.google.com with SMTP id 6so274319bkj.13 for ; Tue, 29 Oct 2013 22:22:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=hhOcNt3o6EA5IDhEIK9tBx0AOs3pXoj+MlQdCDyKGRw=; b=OaIMeLjvS7OU9x0qxs+vAXKvtvAodXaAHtcAaN2BIGBWSGSyoDgzVJCtigatstcjiE SRj1JxQBHHgK5yd2gJIm6sP63D2tMkOjgnZ1PGDcwBHebBVmP37Q3kV8MLMz8OsU7Xs1 9MsRbpUhoFj4RS+5JpXZFKmsd/M9XjjE2LhuGX6OisRgZfRGPyZkhGbMd2+lPMl/mDM4 EI8QT5mjSdwgwHr1xrVa2NnsQy1tvqRVQ672Mj64+8WYwP92oBW2tK3iRi2kMV8mouV2 FYOH8mcYi3eBLQgBhccDaNqAO/PbQQ05/2QzMO5liFTdQ9lGDSFIN3lsfKpZpXpEw60Z BJ8Q== MIME-Version: 1.0 X-Received: by 10.204.121.201 with SMTP id i9mr1653050bkr.13.1383110554832; Tue, 29 Oct 2013 22:22:34 -0700 (PDT) Received: by 10.205.19.10 with HTTP; Tue, 29 Oct 2013 22:22:34 -0700 (PDT) Date: Wed, 30 Oct 2013 13:22:34 +0800 Message-ID: Subject: [PATCH -next] libertas: fix error return code in if_cs_probe() From: Wei Yongjun To: linville@tuxdriver.com, hsweeten@visionengravers.com, gregkh@linuxfoundation.org, dcbw@redhat.com Cc: yongjun_wei@trendmicro.com.cn, libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun 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 Acked-by: Dan Williams --- drivers/net/wireless/libertas/if_cs.c | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }