Re: [PATCH v2] pwm: improve args checking in pwm_apply_state()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 22, 2016 at 10:41:14PM +0200, Boris Brezillon wrote:
> On Wed, 22 Jun 2016 12:16:59 -0700
> Brian Norris <briannorris@xxxxxxxxxxxx> 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



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux