Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759956AbbLCL0e (ORCPT ); Thu, 3 Dec 2015 06:26:34 -0500 Received: from mail-qk0-f170.google.com ([209.85.220.170]:36278 "EHLO mail-qk0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751990AbbLCL0d (ORCPT ); Thu, 3 Dec 2015 06:26:33 -0500 Message-ID: <1449141991.2645.67.camel@gmail.com> Subject: Re: [PATCH v3 1/1] atm: solos-pci: Replace simple_strtol by kstrtoint From: "Charles (Chas) Williams" <3chas3@gmail.com> To: LABBE Corentin Cc: linux-atm-general@lists.sourceforge.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Date: Thu, 03 Dec 2015 06:26:31 -0500 In-Reply-To: <1449129968-22249-2-git-send-email-clabbe.montjoie@gmail.com> References: <1449129968-22249-1-git-send-email-clabbe.montjoie@gmail.com> <1449129968-22249-2-git-send-email-clabbe.montjoie@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 (3.12.11-1.fc21) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 780 Lines: 24 On Thu, 2015-12-03 at 09:06 +0100, LABBE Corentin wrote: > @@ -357,11 +357,11 @@ static int process_status(struct solos_card *card, int port, struct sk_buff *skb > if (!str) > return -EIO; > > - ver = simple_strtol(str, NULL, 10); > - if (ver < 1) { > + err = kstrtoint(str, 10, &ver); > + if (err || ver < 1) { > dev_warn(&card->dev->dev, "Unexpected status interrupt version %d\n", > ver); > - return -EIO; > + return err; If ver < 1 then you might return a 0 here. Always returning -EIO is probably just fine. -- 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/