Received: by 10.223.164.202 with SMTP id h10csp1367530wrb; Mon, 27 Nov 2017 01:37:15 -0800 (PST) X-Google-Smtp-Source: AGs4zMbt8tyGxHPbYojqhBuANTox7ueMbDKeINdpcP2NXo0yuF5U3SSPWQN6c1wrunDUu7ZbtbGN X-Received: by 10.101.101.73 with SMTP id a9mr25596278pgw.148.1511775435036; Mon, 27 Nov 2017 01:37:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511775435; cv=none; d=google.com; s=arc-20160816; b=z/YLPmTc/j6lvnkhw2JEzhHbhdTqsd/WIdexyVID1v7yTBE7zx0BYJB8zocg/vedcn VGorQiSn2R6cQLZ1qStHWKR1VxYX4jxlriSXcxvLf2Dg1uG0+9iRcknQ53fxM5zFB6Mj cvCd2L7+PwxjBCEBfYnlS8umRNzrYWKbAhkN2JysqzkhtE+u0hMS4JRnq+kHQYoEEMKy zI4Jb/qJW0477r+RafDlJV9gHxfw8Onb1abEvsr5Dd2C4SXUY2G1b6XkhadVrlQIq7Qv k0zX3yHMGdPXnaQUkjNIpvuEgrCeoeKJS1NCekxJJqZ1/gEznDoY4M1RMMYsI6t/qKIR +Crg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:arc-authentication-results; bh=tvUECWLiloQB4d+2jnSZ4tZUYNdUXl09xDwp7Z73gns=; b=CznRUZ8zj9sDXrrd9Su80jBH+lrEL/f9gw2MsJ8584gs4G5nUgaCMttJvKsOM8lIY5 7Er96rsQlJdtSxR9TuAReuObytioabcsOWkgMI82jE3p99Qkr9zsz6/vFXQZcI04xO0h Sl8lc+zZqNhfbMfS8yOpsWD9t8a0IHLlZp5W7gnjmhumtbjG+bddYesLVCKjkbbbZajv uoJR9eTnWNE614qqSW2Ri0S2SsBZkxzQsSxHa22xKcXHk+nwbU+zfqf5o6Wq7qmAE8xp 9xRiW4Ghj4oTx+kNo4OvUzFv9ipcgglUTK66oQOxonSOfSSKuNhfbcPunOYC2byb3jvJ vdSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fDhvTU47; 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 ba11si4145778plb.369.2017.11.27.01.37.02; Mon, 27 Nov 2017 01:37:15 -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=fDhvTU47; 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 S1751385AbdK0JfQ (ORCPT + 78 others); Mon, 27 Nov 2017 04:35:16 -0500 Received: from mail-it0-f67.google.com ([209.85.214.67]:42399 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751292AbdK0JfO (ORCPT ); Mon, 27 Nov 2017 04:35:14 -0500 Received: by mail-it0-f67.google.com with SMTP id n134so20220405itg.1; Mon, 27 Nov 2017 01:35:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=tvUECWLiloQB4d+2jnSZ4tZUYNdUXl09xDwp7Z73gns=; b=fDhvTU47mmqaGVXEYWkd482RW7AeCJzQVSP8F9Ee9cuJPjuwh6XEVzIuNgknuw0wVy fuC525OkOOrB11CUnJmF8mnZc3MeWfhpiAvQL6840VqdBbTOmsOVpr10uMNNSg+IBV+w caKJKIYn9Yk/JY6geLkn/uSpZtatFefreZJ0FIbO5SPU6WITeqOM4QyDcuBecdIFtVuY rYNAEy8qFcNCZ3Er2qM5SYBOPSvdwHM7uE9uhPPog6skuq58YMfXkIu97r0EcnmCy4yr 0M14FnUIOneTQ+a9jkeFTeqlzSD/IN2r7vK/bcrE6hEKcE+tzyTjE64hvwYPB3k3p6CT 7CYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=tvUECWLiloQB4d+2jnSZ4tZUYNdUXl09xDwp7Z73gns=; b=b5khx0A3pl53xt8/DCwUcEgLG4Fkq54D4nqf+lrwaJiOdubj1jwF+lP3CTmv4YSGss 8HtF8vhK7lf5RFUWs8LM3kkzL+tyyrwUHgdPSEFguDByvCVvo32GdUyh5UmVtYIE+Z8d 50BGhV7eloy8L8ArKI+CG1UpeaxyeQmdWAX2pcZ3ConX8BwGFYVWFAxGg67PVNTeosCy 8uLVfD+P5jjPTGglFPcsnhLdJtnF3XYLlFETCObjVyN360LvElTE5Ico8ry3LfHoUpCk YLVPe7rJDU60SozIGyNOiSJ4UTqeJmIsUgq3GuOXv+omJrqhNAoG5/oUEWYhWW1yEvk0 Nrbg== X-Gm-Message-State: AJaThX5/Lll2wI8Rb0moSKR9LRykGGhS32XI5/4QW99l+x2eraFykMAI ye9kPyNC/EIFTiIjgRylvSBMMyd4 X-Received: by 10.36.67.141 with SMTP id s135mr28146437itb.142.1511775313880; Mon, 27 Nov 2017 01:35:13 -0800 (PST) Received: from [10.17.129.40] ([223.31.70.102]) by smtp.gmail.com with ESMTPSA id i201sm7263632ita.32.2017.11.27.01.35.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Nov 2017 01:35:13 -0800 (PST) Subject: Re: [PATCH] mmc: usdhi6rol0: Handle return value of platform_get_irq_byname for card detect To: Ulf Hansson References: <8fcf045dd4601511186b828d1911ba4659d8f923.1510936216.git.arvind.yadav.cs@gmail.com> Cc: Wolfram Sang , "linux-kernel@vger.kernel.org" , "linux-mmc@vger.kernel.org" From: Arvind Yadav Message-ID: <65b32c21-bdba-3038-b37f-747663017c5c@gmail.com> Date: Mon, 27 Nov 2017 15:04:59 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Monday 27 November 2017 03:01 PM, Ulf Hansson wrote: > On 17 November 2017 at 17:35, Arvind Yadav wrote: >> platform_get_irq_byname() can fail here and we must check its return value. > NAK. > > You need to check the code more carefully. irq_cd is dealt with later > below in the same function with proper error handling. Yes, your are right. Sorry for noise. >> Signed-off-by: Arvind Yadav >> --- >> drivers/mmc/host/usdhi6rol0.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c >> index cdfeb15..5a896de 100644 >> --- a/drivers/mmc/host/usdhi6rol0.c >> +++ b/drivers/mmc/host/usdhi6rol0.c >> @@ -1749,7 +1749,7 @@ static int usdhi6_probe(struct platform_device *pdev) >> irq_cd = platform_get_irq_byname(pdev, "card detect"); >> irq_sd = platform_get_irq_byname(pdev, "data"); >> irq_sdio = platform_get_irq_byname(pdev, "SDIO"); >> - if (irq_sd < 0 || irq_sdio < 0) >> + if (irq_cd < 0 || irq_sd < 0 || irq_sdio < 0) >> return -ENODEV; >> >> mmc = mmc_alloc_host(sizeof(struct usdhi6_host), dev); >> -- >> 2.7.4 >> ~arvind From 1585211236251076398@xxx Mon Nov 27 09:34:02 +0000 2017 X-GM-THRID: 1584356269395832869 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread