From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752534AbcFVUqx (ORCPT ); Wed, 22 Jun 2016 16:46:53 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:34313 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752141AbcFVUqv (ORCPT ); Wed, 22 Jun 2016 16:46:51 -0400 Date: Wed, 22 Jun 2016 13:46:48 -0700 From: Brian Norris To: Boris Brezillon Cc: Geert Uytterhoeven , Thierry Reding , Linux PWM List , "linux-kernel@vger.kernel.org" , Brian Norris , Doug Anderson , linux-renesas-soc@vger.kernel.org, Laurent Pinchart Subject: Re: [PATCH v2] pwm: improve args checking in pwm_apply_state() Message-ID: <20160622204647.GA14996@google.com> References: <1464367549-111530-1-git-send-email-briannorris@chromium.org> <20160621183730.GA130978@google.com> <20160622100422.5c34f975@bbrezillon> <20160622191658.GA106497@google.com> <20160622224114.697c0db5@bbrezillon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160622224114.697c0db5@bbrezillon> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 22, 2016 at 10:41:14PM +0200, Boris Brezillon wrote: > On Wed, 22 Jun 2016 12:16:59 -0700 > Brian Norris wrote: > > Notably, you're dropping the 'if (!pwm) { }' safety checks that are part > > of pwm_disable() and pwm_set_polarity(). But I don't think there should > > be any users relying on that. > > Indeed. I can add it back here if you prefer, Nah, that's ok. I just had to say it anyway :) > but honestly, PWM users > that are not checking the value returned by pwm_get() should be > considered buggy IMHO, and a NULL pointer exception is a good way to > make people realize they are not properly using the API :). Seems OK. Brian