Re: [PATCH] media: nxp: isi: Check whether pad is non-NULL before access

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

 



On Sat, Dec 02, 2023 at 07:44:47AM +0100, Marek Vasut wrote:
> On 12/2/23 03:27, Fabio Estevam wrote:
> > On Fri, Dec 1, 2023 at 12:06 PM Marek Vasut <marex@xxxxxxx> wrote:
> > 
> >>          pad = media_pad_remote_pad_first(&xbar->pads[sink_pad]);
> >> -       sd = media_entity_to_v4l2_subdev(pad->entity);
> >> +       if (!pad) {
> >> +               dev_dbg(xbar->isi->dev,
> > 
> > Maybe dev_err() here instead?
> 
> That dev_dbg() is aligned with the prints in the rest of the function 
> and it's not like kernel should do dev_err() into kernel log every time 
> userspace does something wrong.

We usually use dev_dbg() for errors that can be easily triggered from
userspace, to avoid giving unpriviledged processes an easy way to flood
the kernel log.

> > Anyway:
> > 
> > Reviewed-by: Fabio Estevam <festevam@xxxxxxxxx>
> 
> Thanks !

-- 
Regards,

Laurent Pinchart




[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