Re: [PATCH]PTP:PTP_CHARDEV:add input parameters check to avoid the NULL pointer reference

From: Richard Cochran
Date: Mon Dec 05 2016 - 03:33:16 EST


On Mon, Dec 05, 2016 at 08:02:02AM +0000, Deng Feng wrote:
> When we call one function which contained pointers as input parameters,
> we must check the pointers are NULL or not before we make use of them,
> which avoid the NULL pointer reference .

NAK.

These functions belong to an internal kernel API, and the callers
always provide non-NULL arguments. This isn't some user space
library.

Thanks,
Richard