Re: [PATCH] staging: media: lirc: lirc_zilog: Fix for possible null pointer dereference

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

 



2015-01-30 14:09 GMT+01:00  <Valdis.Kletnieks@xxxxxx>:
> On Fri, 30 Jan 2015 16:00:02 +0300, Dan Carpenter said:
>
>> > > - if (ir == NULL) {
>> > > -         dev_err(ir->l.dev, "close: no private_data attached to the file
> !\n");
>> >
>> > Yes, the dev_err() call is an obvious thinko.
>> >
>> > However, I'm not sure whether removing it entirely is right either.  If
>> > there *should* be a struct IR * passed there, maybe some other printk()
>> > should be issued, or even a WARN_ON(!ir), or something?
>>
>> We set filep->private_data to non-NULL in open() so I don't think it can
>> be NULL here.
>
> Then probably the *right* fix is to remove the *entire* if statement, as
> we can't end up doing the 'return -ENODEV'....


Hi

Ok, but think or know. Who knows?
Do the remove if patch?


Kind regards
Rickard Strandqvist
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux