Re: [PATCH] viacam: Don't explode if pci_find_bus() returns NULL

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

 



On Sun, 3 Jul 2011 09:54:12 +0200 (CEST)
Jesper Juhl <jj@xxxxxxxxxxxxx> wrote:

> In the unlikely case that pci_find_bus() should return NULL
> viacam_serial_is_enabled() is going to dereference a NULL pointer and
> blow up. Better safe than sorry, so be defensive and check the
> pointer.

Extremely unlikely - that function is only called on a single architecture
where the bus is known to exist.  Still, no harm can come from checking.

Acked-by: Jonathan Corbet <corbet@xxxxxxx>

Thanks,

jon
--
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