From patchwork Fri Apr 12 07:15:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sanjay Singh Rawat X-Patchwork-Id: 16073 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-gg0-f197.google.com (mail-gg0-f197.google.com [209.85.161.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A2FB026E90 for ; Fri, 12 Apr 2013 07:15:40 +0000 (UTC) Received: by mail-gg0-f197.google.com with SMTP id k5sf3288298ggn.4 for ; Fri, 12 Apr 2013 00:15:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=blU73Am3Yrv2r6q+fetVwx6yQWbOCfJKOElNWDTv2RU=; b=B0S84Yw+UmBvWD07vfhSTUKjKjfMS+yWNjkbBYefRx5zg+TcfMtM6BTqbSnBjWPfrt LEgsV7UNqBZc9snjXZpgHdntMkO95Cco9/SnOTWA0QnuWYE1yoBfPSeWFJ457QKmFXJL KaBHpLrE/B+sUaaAfeQ8Nv0mTgkFulXmF3seIXz7I4gje9yKzFJjMoHieRDHopkVlSEH 4wIk6iNoplGaJsp4Df9bpgJDkrf4ELaSw4y/HvSxlAFLKmzvvPwIaN5nklnSby7vNgAx iIlBtyPqrPDKO7CFjQIhiokbgW9nWEmeIdOLUFRR8R577uhm893tOTJutVNWASK08GO2 +/Ww== X-Received: by 10.224.18.132 with SMTP id w4mr5650714qaa.1.1365750917307; Fri, 12 Apr 2013 00:15:17 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.5.170 with SMTP id t10ls938983qet.19.gmail; Fri, 12 Apr 2013 00:15:17 -0700 (PDT) X-Received: by 10.52.95.33 with SMTP id dh1mr6330086vdb.52.1365750917108; Fri, 12 Apr 2013 00:15:17 -0700 (PDT) Received: from mail-vb0-x22f.google.com (mail-vb0-x22f.google.com [2607:f8b0:400c:c02::22f]) by mx.google.com with ESMTPS id sc6si5815301vdc.8.2013.04.12.00.15.16 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Apr 2013 00:15:17 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22f is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22f; Received: by mail-vb0-f47.google.com with SMTP id x13so1876957vbb.6 for ; Fri, 12 Apr 2013 00:15:16 -0700 (PDT) X-Received: by 10.52.93.235 with SMTP id cx11mr6249479vdb.51.1365750916855; Fri, 12 Apr 2013 00:15:16 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp53974veb; Fri, 12 Apr 2013 00:15:16 -0700 (PDT) X-Received: by 10.66.197.165 with SMTP id iv5mr13900780pac.7.1365750915794; Fri, 12 Apr 2013 00:15:15 -0700 (PDT) Received: from mail-da0-x22a.google.com (mail-da0-x22a.google.com [2607:f8b0:400e:c00::22a]) by mx.google.com with ESMTPS id wn1si7671396pbc.351.2013.04.12.00.15.15 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Apr 2013 00:15:15 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c00::22a is neither permitted nor denied by best guess record for domain of sanjay.rawat@linaro.org) client-ip=2607:f8b0:400e:c00::22a; Received: by mail-da0-f42.google.com with SMTP id n15so1020874dad.15 for ; Fri, 12 Apr 2013 00:15:15 -0700 (PDT) X-Received: by 10.67.4.167 with SMTP id cf7mr12835823pad.62.1365750915301; Fri, 12 Apr 2013 00:15:15 -0700 (PDT) Received: from srawat-Latitude-E6420.LGE.NET ([203.247.149.152]) by mx.google.com with ESMTPS id gi10sm7383271pbc.40.2013.04.12.00.15.11 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Apr 2013 00:15:14 -0700 (PDT) From: Sanjay Singh Rawat To: sanjay.rawat@lge.com Cc: patches@linaro.org, Sanjay Singh Rawat Subject: [Patch send pmqa] pm-qa: regulator failted error info cleanup Date: Fri, 12 Apr 2013 12:45:13 +0530 Message-Id: <1365750913-12446-1-git-send-email-sanjay.rawat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQl1LWlFzKu+9mj/lzVRCNnuyaBLcCeIBAfrrs+ohlEDHFPwAofoEDB09R4p62eRPkkMVTWM X-Original-Sender: sanjay.rawat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22f is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Sanjay Singh Rawat --- display.c | 4 +++- powerdebug.c | 2 +- regulator.c | 4 +++- tree.c | 4 +++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/display.c b/display.c index f06387c..39a8e71 100644 --- a/display.c +++ b/display.c @@ -593,8 +593,10 @@ int display_register(int win, struct display_ops *ops) { size_t array_size = sizeof(windata) / sizeof(windata[0]); - if (win < 0 || win >= array_size) + if (win < 0 || win >= array_size) { + printf("error: invalid window"); return -1; + } windata[win].ops = ops; diff --git a/powerdebug.c b/powerdebug.c index 073fd42..dd6ac04 100644 --- a/powerdebug.c +++ b/powerdebug.c @@ -243,7 +243,7 @@ int main(int argc, char **argv) } if (regulator_init()) { - printf("not enough memory to allocate regulators info\n"); + printf("failed to initialize regulator info\n"); options->regulators = false; } diff --git a/regulator.c b/regulator.c index 0da924a..68c686f 100644 --- a/regulator.c +++ b/regulator.c @@ -218,8 +218,10 @@ static int fill_regulator_cb(struct tree *t, void *data) struct regulator_info *reg; reg = regulator_alloc(); - if (!reg) + if (!reg) { + printf("error: unable to allocate memory for regulator\n"); return -1; + } t->private = reg; /* we skip the root node but we set it expanded for its children */ diff --git a/tree.c b/tree.c index d331c60..686e846 100644 --- a/tree.c +++ b/tree.c @@ -121,8 +121,10 @@ static int tree_scan(struct tree *tree, tree_filter_t filter, bool follow) int ret = 0; dir = opendir(tree->path); - if (!dir) + if (!dir) { + printf("error: unable to open directory %s\n", tree->path); return -1; + } while (!readdir_r(dir, &dirent, &direntp)) {