From patchwork Tue Jan 9 09:39:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10151423 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5A87E603ED for ; Tue, 9 Jan 2018 09:43:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E51328A06 for ; Tue, 9 Jan 2018 09:43:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31A8528A09; Tue, 9 Jan 2018 09:43:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B423B28A06 for ; Tue, 9 Jan 2018 09:43:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753281AbeAIJnU (ORCPT ); Tue, 9 Jan 2018 04:43:20 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:33246 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753273AbeAIJnR (ORCPT ); Tue, 9 Jan 2018 04:43:17 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.21) with SMTP id w099gtqO135726; Tue, 9 Jan 2018 09:43:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2017-10-26; bh=iB8PuSvYDkhasaoHyN9HHlKu7sI5fchjvTg8whlNhFc=; b=BrkZEBbfW77D7y6Jz9du23Fl1Ys4RacX6Go5MtOj3NlcxQrJRPOjBprkBkup+aoApH77 YytTGu51TiCiec7uYSyYxfc/tQyPHpaPV7FQhRus27KzCILxzJsG9HIdHt1tbgBqTBuS jvcAfKbvfwcoff9kVkU+GXxAr0z+0wCmqPUwkqPDWsEmAGAxSlTM1Xjv7xaX9uYQ+6fC j638jfpcgpgb9aVqeZFdejZ4thFtuCauB+uPXSuN3an+O8xxpzDI02U1/SrbsufdLjw1 2D7MSpdPDP1Kq0R5EpBjijwCc2MKIs1m8VivwGEWc2TTos7Ow1folW5VyEEoJsXj4tlw nQ== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2fcsj18dmk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 09 Jan 2018 09:42:59 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w099dMhG003564 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 9 Jan 2018 09:39:23 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w099dKYN017741; Tue, 9 Jan 2018 09:39:20 GMT Received: from mwanda (/197.157.34.162) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 09 Jan 2018 01:39:19 -0800 Date: Tue, 9 Jan 2018 12:39:10 +0300 From: Dan Carpenter To: Wolfram Sang Cc: Ulf Hansson , linux-mmc@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] mmc: tmio, renesas_sdhi: Remove unneeded NULL check Message-ID: <20180109093910.sbwgcqilgyfhjfns@mwanda> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8768 signatures=668652 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=815 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801090137 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The inconsistent NULL checking in this function causes static checker warnings. drivers/mmc/host/renesas_sdhi_sys_dmac.c:360 renesas_sdhi_sys_dmac_issue_tasklet_fn() error: we previously assumed 'host' could be null (see line 351) On reviewing this code, "host" can't ever be NULL so we can just remove the check. Signed-off-by: Dan Carpenter --- To unsubscribe from this list: send the line "unsubscribe linux-mmc" 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/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c index c8a74b2dee00..82d757c480b2 100644 --- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c +++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c @@ -348,7 +348,7 @@ static void renesas_sdhi_sys_dmac_issue_tasklet_fn(unsigned long priv) spin_lock_irq(&host->lock); - if (host && host->data) { + if (host->data) { if (host->data->flags & MMC_DATA_READ) chan = host->chan_rx; else