Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752503AbbGBDXl (ORCPT ); Wed, 1 Jul 2015 23:23:41 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:46092 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751005AbbGBDXe (ORCPT ); Wed, 1 Jul 2015 23:23:34 -0400 X-AuditID: cbfee68d-f79106d00000728c-27-5594aeb41814 From: Maninder Singh To: sameo@linux.intel.com, lee.jones@linaro.org, linux-kernel@vger.kernel.org Cc: k.kozlowski@samsung.com, pankaj.m@samsung.com, Maninder Singh Subject: [PATCH v2] mfd : t7l66xb: remove unnecessary pdata check Date: Thu, 02 Jul 2015 08:52:58 +0530 Message-id: <1435807378-18692-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGLMWRmVeSWpSXmKPExsWyRsSkRnfLuimhBi+Pq1i8fmFocf/rUUaL y7vmsFkcnt/GYnHvzVYmi9PdrA5sHneu7WHzmHcy0KNvyypGj8+b5AJYorhsUlJzMstSi/Tt Ergyti9rYylo4qg4ueIVSwPjXrYuRk4OCQETiTsHz7BA2GISF+6tB4pzcQgJLGWUmPOhF67o w4J+dojEIkaJvVMms0I4Pxklll+ZyQpSxSagJ7Fq1x6wUSICvhLnPn4F62YWiJU4sPwhO4gt LOAosXXrcSYQm0VAVeL/xVtg9bwC7hIbO6cA2RxA2xQk5kyyAZkvIfCaTaJn7xl2iHoBiW+T D0HVyEpsOsAMcZykxMEVN1gmMAouYGRYxSiaWpBcUJyUXmSoV5yYW1yal66XnJ+7iREYnKf/ PevdwXj7gPUhRgEORiUe3oCqKaFCrIllxZW5hxhNgTZMZJYSTc4HxkBeSbyhsZmRhamJqbGR uaWZkjivotTPYCGB9MSS1OzU1ILUovii0pzU4kOMTBycUg2M82t6D9e+6Zuw7skvyQrzt4L7 NnaFrnFd7WMhd7BOijHska5fzj3zd3baMQwddyqvu7JpvMxS5ao+EGy3QffFmwcF3cWH7B8m sDH6tXpUrp66zCBfbMNJ/kYLq+Npny7PbF7azJXeOGdqeBSP48XNXBMu7mWIaylI35D79f9L 71mP5nmafp6uxFKckWioxVxUnAgAmrkEx0kCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpgkeLIzCtJLcpLzFFi42I5/e+xgO6WdVNCDT7NlLR4/cLQ4v7Xo4wW l3fNYbM4PL+NxeLem61MFqe7WR3YPO5c28PmMe9koEffllWMHp83yQWwRDUw2mSkJqakFimk 5iXnp2TmpdsqeQfHO8ebmhkY6hpaWpgrKeQl5qbaKrn4BOi6ZeYArVZSKEvMKQUKBSQWFyvp 22GaEBripmsB0xih6xsSBNdjZIAGEtYwZmxf1sZS0MRRcXLFK5YGxr1sXYycHBICJhIfFvSz Q9hiEhfurQeKc3EICSxilNg7ZTIrhPOTUWL5lZmsIFVsAnoSq3btYQGxRQR8Jc59/Ao2iVkg VuLA8odgk4QFHCW2bj3OBGKzCKhK/L94C6yeV8BdYmPnFCCbA2ibgsScSTYTGLkXMDKsYhRN LUguKE5KzzXUK07MLS7NS9dLzs/dxAgO/WdSOxhXNlgcYhTgYFTi4V1RMyVUiDWxrLgy9xCj BAezkggv8wSgEG9KYmVValF+fFFpTmrxIUZToOUTmaVEk/OBcZlXEm9obGJuamxqaWJhYmap JM57Mt8nVEggPbEkNTs1tSC1CKaPiYNTqoHRldHvWtjWnPciIY8LdQSnl7kvZHzY11Sz+aHe LieJc50uL4s/GVixOHMwbcj/4MzhxNG4uaJbVDby8iUe34/vTk17pVF6TIuj6NW6jlW+bxTr Wlm26BS/XFYf+8b12tu3QmY1j9hVL85i0dj78JRo68PZXxaGTalVPl5+MmdTUc6hzi3q2xYq sRRnJBpqMRcVJwIAvMR0FpMCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1235 Lines: 42 o Making pdata NULL check to (!pdata) as coding standard and all other checks in file. o Removing redundant check of pdata, because we already check for pdata, and also derefernced before this check. Signed-off-by: Maninder Singh --- v2: changing subject line. drivers/mfd/t7l66xb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c index c09fb5d..854b05f 100644 --- a/drivers/mfd/t7l66xb.c +++ b/drivers/mfd/t7l66xb.c @@ -318,7 +318,7 @@ static int t7l66xb_probe(struct platform_device *dev) struct resource *iomem, *rscr; int ret; - if (pdata == NULL) + if (!pdata) return -EINVAL; iomem = platform_get_resource(dev, IORESOURCE_MEM, 0); @@ -371,7 +371,7 @@ static int t7l66xb_probe(struct platform_device *dev) clk_prepare_enable(t7l66xb->clk48m); - if (pdata && pdata->enable) + if (pdata->enable) pdata->enable(dev); /* Mask all interrupts */ -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/