Received: by 10.223.164.202 with SMTP id h10csp1434462wrb; Wed, 15 Nov 2017 20:40:30 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ9kp4Xk+HwUx6J2uacZDmOK7eKGJN8Lpxa6D8La9WocA6lgn61qb4KTiSjOpalEnodj9kB X-Received: by 10.84.241.15 with SMTP id a15mr431707pll.103.1510807230206; Wed, 15 Nov 2017 20:40:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510807230; cv=none; d=google.com; s=arc-20160816; b=iZcXL+aKN0DjGrX0eCS/qtTfVI+yNSA2CA90w8WQNKp1JAje7lstOH4x2OCZdDu31Y JBoZmbOsUuZkwZtD9oM7hbPjrL83mrbzPE4pwFv/mttyfM8mCI+F6YlL56GOFFzuT52c WepuBlhny/v/coKcYyLOp18Mi5qiequIxA0qzsEpkzgY2MyVKla9kciA8riJATmwPemm QySRW7ids2b4GWyfgrq7Vh/nJix9qJbFmGix2qhR6Ez5ewmd2bQmR44wAuDkLIdUmAz1 kQfZ5ja1kT+JNmgXmIe9AJiR4EaPgptKiiEKvYv3eKYFtAV5QXJ8P0mWE7iwjAigl/tA I8Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=3ssCYKl2dPshuHRybwkq8sGp3XsNtB87x9k7N21MLxE=; b=VxwMF4neTRAVdfGAf0/+8OmKUTOq76fYmPkW1+7Ga8rGd2do3cAIFxEXD0AWqID/r4 aqHq0iE3dLJmrC+n7Yx07luDhONy9ZC4jE6DVHJJgceDvlNS0RXy22libUHZk0nT+pfJ IaLX4UFzmZo4h20o+h+NWHFxQzOhSi+n7pbbiZPhfYsQ4DL3kzRvFb3Epxm63p1Un4Xe kC5E/7nL0llvrPun7vp2Uv6B+1cVBnvgvH+f1MsCnab4hXekena8pjCDRC47Iu0iD1kW gTaJqSOHvQNILrRai4d3aot3jW63V+vbhatGVOMY5kEWNr/y+aN1EUxrc1pNMlKEJYfQ 0tFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gAoA6aiL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c11si199486pll.212.2017.11.15.20.40.17; Wed, 15 Nov 2017 20:40:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gAoA6aiL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933162AbdKPEiz (ORCPT + 89 others); Wed, 15 Nov 2017 23:38:55 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:48711 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932931AbdKPEit (ORCPT ); Wed, 15 Nov 2017 23:38:49 -0500 Received: by mail-pf0-f196.google.com with SMTP id r62so6139589pfd.5; Wed, 15 Nov 2017 20:38:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=3ssCYKl2dPshuHRybwkq8sGp3XsNtB87x9k7N21MLxE=; b=gAoA6aiLq+M1wtDKbZ8YFq2kiZEc2c6wJpM8AqxG4d1AmQb7IDZbzDjQJ8IxZ/l01C x+yIwTJtZmq7h5kt689K02e7fwSsLhaSfi144DxxukEo46xdKuglOaLAD5qeuGjkUXzz aY7O4bXgrBt0H4KhpY0g5ihx7rQFvtaoHmitQZ12B7kiGfXTAdwx0p9DmiMVNZg2bZIF +WNZA5HguVpqfTUR7VaRiNmuCaT/MLoa8CcMCo8eKX2gVLYzVgpnPSvOfprQgN+sXQVy +/DQFuGdTA2QAYDfQQh8CKJJYbZT+7TqiADIXtg7iX0FaOTattSkds8SQSiqBg83EjKj RXtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3ssCYKl2dPshuHRybwkq8sGp3XsNtB87x9k7N21MLxE=; b=OWUc2Nc8f+h2kL+bqHjYMMeZIXfqsW/qMam2gd94JplGU1Jw2O2YE4iantqhBowE1d cNr1fXFbPSInHh8cs94lMcnFdupXOLpaby4xitL5kwC3plA/v3bfDcf/pKxfaFlKB/Cd maD+FdNVQXHTxidB27lOs9TbLOkuwP0Ql0Ky954B7fpOL+eYcMRJYic20N4p9ld4M9H1 vlzKK91SUruqvwqvNu+oCw11yCxBolwHtv4X5PNyuzB3pzZIzjpySOoMsah7H9yDzBsh w0QflkK1/vyOSrhGs+JL64+mOOfkomj2IwiDfTWDvxUqp+y4y21kBNJPiT0VobJnbqOp 9/dw== X-Gm-Message-State: AJaThX5njGcPT/UWbY4NvOF/FBaW+loIEEJ3mewkpqpwdLK2YdeqKYRD Ls1iJga6kvLpv45SY+Vc+M0lFg== X-Received: by 10.98.34.199 with SMTP id p68mr439585pfj.241.1510807129001; Wed, 15 Nov 2017 20:38:49 -0800 (PST) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id r16sm332895pgt.72.2017.11.15.20.38.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Nov 2017 20:38:48 -0800 (PST) From: Arvind Yadav To: david@hardeman.nu, mchehab@kernel.org Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH] [media] winbond-cir: Fix pnp_irq's error checking for wbcir_probe Date: Thu, 16 Nov 2017 10:07:51 +0530 Message-Id: <72c69922ccb3b83c47d0a824bdaeba335ab1cdb5.1510806986.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The pnp_irq() function returns -1 if an error occurs. pnp_irq() error checking for zero is not correct. Signed-off-by: Arvind Yadav --- drivers/media/rc/winbond-cir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c index 3ca7ab4..0adf099 100644 --- a/drivers/media/rc/winbond-cir.c +++ b/drivers/media/rc/winbond-cir.c @@ -1044,7 +1044,7 @@ struct wbcir_data { data->irq = pnp_irq(device, 0); if (data->wbase == 0 || data->ebase == 0 || - data->sbase == 0 || data->irq == 0) { + data->sbase == 0 || data->irq == -1) { err = -ENODEV; dev_err(dev, "Invalid resources\n"); goto exit_free_data; -- 1.9.1 From 1584223006041716551@xxx Thu Nov 16 11:46:32 +0000 2017 X-GM-THRID: 1584163487225186903 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread