Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752801AbbF3MNI (ORCPT ); Tue, 30 Jun 2015 08:13:08 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:35330 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752147AbbF3MNC (ORCPT ); Tue, 30 Jun 2015 08:13:02 -0400 X-AuditID: cbfee68f-f793b6d000005f66-13-559287cc4563 From: Maninder Singh To: sameo@linux.intel.com, lee.jones@linaro.org, linux-kernel@vger.kernel.org Cc: pankaj.m@samsung.com, Maninder Singh Subject: [PATCH 1/1] mfd: remove unnecessary check Date: Tue, 30 Jun 2015 17:42:06 +0530 Message-id: <1435666326-10039-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrALMWRmVeSWpSXmKPExsWyRsSkWvdM+6RQg/ONuhb3vx5ltLi8aw6b xeH5bSwW995sZbI43c3qwOpx59oeNo95JwM9+rasYvT4vEkugCWKyyYlNSezLLVI3y6BK+NA 4xyWgukcFTcfzGRvYLzC1sXIySEhYCKx/uNrRghbTOLCvfVAcS4OIYGljBL3/21lgSm6N2kz VGI6o8SZ0w0sEM5PRomvU/czgVSxCehJrNq1B6xDRMBX4tzHr0AdHBzMAk4S07/qgYSFBYwk +v9sAdvMIqAq8fjoHWYQm1fAXeJ472t2kHIJAQWJOZNsIPY+Z5PofmQDUS4g8W3yIRaIElmJ TQeYIUokJQ6uuMEygVFwASPDKkbR1ILkguKk9CJjveLE3OLSvHS95PzcTYzAgDz971n/Dsa7 B6wPMQpwMCrx8L6ImRQqxJpYVlyZe4jRFGjDRGYp0eR8YNjnlcQbGpsZWZiamBobmVuaKYnz LpT6GSwkkJ5YkpqdmlqQWhRfVJqTWnyIkYmDU6qBkSXhxsfQuxXmj/iFb+2NOTnzaeeEvk/3 6hr2NTTl2c/bfLRSgJ8xrji66Lm0aLRX/Y+oiqb7gl8UGeOcn9THnFZ8yDcvYs1KH133xo81 8gzea0M3RExwqWef+yLIdamfecmdVb8q7F7X/rxfuz78dsmKRcFbnpYVaYgueHpTvU7i6zsr fvUPSizFGYmGWsxFxYkA4Q1WikMCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNLMWRmVeSWpSXmKPExsVy+t9jQd0z7ZNCDf6tU7O4//Uoo8XlXXPY LA7Pb2OxuPdmK5PF6W5WB1aPO9f2sHnMOxno0bdlFaPH501yASxRDYw2GamJKalFCql5yfkp mXnptkrewfHO8aZmBoa6hpYW5koKeYm5qbZKLj4Bum6ZOUBrlRTKEnNKgUIBicXFSvp2mCaE hrjpWsA0Ruj6hgTB9RgZoIGENYwZBxrnsBRM56i4+WAmewPjFbYuRk4OCQETiXuTNkPZYhIX 7q0Hsrk4hASmM0qcOd3AAuH8ZJT4OnU/E0gVm4CexKpde1hAbBEBX4lzH78CdXBwMAs4SUz/ qgcSFhYwkuj/swVsKIuAqsTjo3eYQWxeAXeJ472v2UHKJQQUJOZMspnAyL2AkWEVo2hqQXJB cVJ6rqFecWJucWleul5yfu4mRnDAP5PawbiyweIQowAHoxIPr4TNpFAh1sSy4srcQ4wSHMxK Irw9TUAh3pTEyqrUovz4otKc1OJDjKZAyycyS4km5wOjMa8k3tDYxNzU2NTSxMLEzFJJnPdk vk+okEB6YklqdmpqQWoRTB8TB6dUA+NuzeX3gs9wKBps4MlY0eb0nu2fXsmJ9Bv/vAsVC7Ma Dr+wKI1d8P/u9fadyYs1bHZKy19q+/Jxu+Lq04bOsktW2b2Tbm3undY0N1zSKpP9RYbIq8O6 vw9tErf0OqR9tGZe+8NDs57ktjBsvVaquSK2dvvnd3Yee9j7Tk+IMAjdliy2smO9r5MSS3FG oqEWc1FxIgCeD65KjgIAAA== 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: 1257 Lines: 41 o Making pdata NULL check to (!pdata) as coding statndard 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 Reviewed-by: Vaneet Narang --- 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/