Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1173096AbdDXPIG (ORCPT ); Mon, 24 Apr 2017 11:08:06 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36727 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1428261AbdDXPHy (ORCPT ); Mon, 24 Apr 2017 11:07:54 -0400 Subject: Re: [PATCH 2/4] mfd: Add ROHM BD9571MWV-M MFD PMIC driver To: Lee Jones References: <20170416180801.17828-1-marek.vasut+renesas@gmail.com> <20170416180801.17828-2-marek.vasut+renesas@gmail.com> <20170424113847.4z7bobboucttk3ir@dell> Cc: linux-renesas-soc@vger.kernel.org, Marek Vasut , linux-kernel@vger.kernel.org, Geert Uytterhoeven From: Marek Vasut Message-ID: Date: Mon, 24 Apr 2017 17:03:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: <20170424113847.4z7bobboucttk3ir@dell> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1020 Lines: 41 On 04/24/2017 01:38 PM, Lee Jones wrote: > On Sun, 16 Apr 2017, Marek Vasut wrote: [...] >> +static int bd9571mwv_identify(struct bd9571mwv *bd) >> +{ >> + struct device *dev = bd->dev; >> + unsigned int value; >> + int ret; >> + >> + ret = regmap_read(bd->regmap, BD9571MWV_VENDOR_CODE, &value); >> + if (ret) { >> + dev_err(dev, "Failed to read vendor code register\n"); > > Nit: Don't you care what the return value is? Not really, but I added the reporting. I wonder whether it shouldn't be the regmap which reports those kinds of failures, just like ie. when k*alloc() fails. >> + return ret; >> + } >> + >> + if (value != BD9571MWV_VENDOR_CODE_VAL) { >> + dev_err(dev, "Invalid vendor code ID %02x (expected %02x)\n", >> + value, BD9571MWV_VENDOR_CODE_VAL); >> + return -EINVAL; >> + } >> + >> + ret = regmap_read(bd->regmap, BD9571MWV_PRODUCT_CODE, &value); >> + if (ret) { >> + dev_err(dev, "Failed to read product code register\n"); > > Same. And fixed globally ... -- Best regards, Marek Vasut