From patchwork Fri Jul 27 23:45:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 950424 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=boundarydevices.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=boundarydevices-com.20150623.gappssmtp.com header.i=@boundarydevices-com.20150623.gappssmtp.com header.b="zuje5Nmt"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 41clvt3fW7z9ryn for ; Sat, 28 Jul 2018 09:45:45 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E4A01C21C4A; Fri, 27 Jul 2018 23:45:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 19D55C21C51; Fri, 27 Jul 2018 23:45:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 21C17C21C51; Fri, 27 Jul 2018 23:45:35 +0000 (UTC) Received: from mail-oi0-f67.google.com (mail-oi0-f67.google.com [209.85.218.67]) by lists.denx.de (Postfix) with ESMTPS id 7597BC21C4A for ; Fri, 27 Jul 2018 23:45:34 +0000 (UTC) Received: by mail-oi0-f67.google.com with SMTP id y207-v6so11939486oie.13 for ; Fri, 27 Jul 2018 16:45:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=QO35vu8QCUeNQO4WGbaWDvu47Zrrkzaen3D1E3+G4kc=; b=zuje5NmtnidhqvQNlCB4wRsOgZ8hyJqX9GV9DBhQ6S57VoU9vaE5whuTHFNT8ihoUe 2K0w1OH2WXbR2IWrK4F7PquEUQLlpzU5c4jwIxBHethoKantw/Y33dTCu/8kxpog3ViC IoX1oMm13exwdKR3MBcE3d95dWq9DLwULKsbTRU138agsiYEqEA3vW5t9VMaQ1cwGnl6 4JGyJpQrQ+Ud70agM0w2GpdqkKUPacoAkk1+Tco1lqHW6S+zbx3GbzECDLaVRKuI5Jow oy2CTnrnwwImQ59O/fFFgJS3IR7GYRqn2FJ2NoAkQ7LRo+dlFUdDABj826LTMyZnXA8x p/hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=QO35vu8QCUeNQO4WGbaWDvu47Zrrkzaen3D1E3+G4kc=; b=SXQlS2PWNLwjaWcagnladPw2vuctfrS5jgZuZpv8qNCfCyaNlVmEIjzOjiVpJ+OiGU nwBeIzkhI/hk4CucEk9evdtN9c91IcmYz/GGQQr86pqOptwpzT4RDqjbjCLpLfieXKKr exF40JXSBEhsgjHIQthfdV7NNHLGsvyVsTlDIIcQ3+5H9t+XepffUMuK3gbaZhoedzEy AjdN8ouylrqhDZfR5OXfx6eAoDideyqgz1yN/FnEM3Qe1QeWxcGlJliSJiV//PhvtE8R 82LZD0XHe8+hYDeLJBUdhfCmf4hanIW4KSx+8pOznYjYAF3XKLj0WvlaVfB+rFodmI13 Mjvg== X-Gm-Message-State: AOUpUlGy3C3u15KQ2VReP8/Lp4kFRlj0D+l38ggMe68/2b5Dj7ufiRE9 CQ2hHGvQ2hpVGcPi8C/0r5G61A== X-Google-Smtp-Source: AAOMgpfy0HYHJs96O98XomZRy3AiBs0J63whmI3rVxmuQsifTCYN/mU0M9lEkqgdhCV3OMmbvj3ZuQ== X-Received: by 2002:aca:36d7:: with SMTP id d206-v6mr7900842oia.63.1532735133002; Fri, 27 Jul 2018 16:45:33 -0700 (PDT) Received: from localhost.localdomain (wsip-174-76-17-244.oc.oc.cox.net. [174.76.17.244]) by smtp.googlemail.com with ESMTPSA id u18-v6sm3143639oiv.10.2018.07.27.16.45.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Jul 2018 16:45:32 -0700 (PDT) From: Troy Kisky To: sjg@chromium.org Date: Fri, 27 Jul 2018 16:45:26 -0700 Message-Id: <20180727234526.307-1-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 2.14.1 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH] sata: fix sata_Probe return value check X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" sata_probe returns 1 for failure, so don't checkout for < 0 fixes: f19f1ecb6025 dm: sata: Support driver model with the 'sata' command Signed-off-by: Troy Kisky Reviewed-by: Simon Glass diff --git a/cmd/sata.c b/cmd/sata.c index cc12afb07e..4f0c6e0137 100644 --- a/cmd/sata.c +++ b/cmd/sata.c @@ -107,8 +107,8 @@ static int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) /* If the user has not yet run `sata init`, do it now */ if (sata_curr_device == -1) { rc = sata_probe(0); - if (rc < 0) - return CMD_RET_FAILURE; + if (rc) + return rc; sata_curr_device = 0; }