Hi Jonathan, Do you mean using IS_ERR() here directly? I think it should be OK. I will change to IS_ERR() in next version. Regards, Libin >-----Original Message----- >From: Jonathan Corbet [mailto:corbet@xxxxxxx] >Sent: Saturday, June 22, 2013 1:02 AM >To: Libin Yang >Cc: g.liakhovetski@xxxxxx; mchehab@xxxxxxxxxx; >linux-media@xxxxxxxxxxxxxxx; albert.v.wang@xxxxxxxxx >Subject: Re: [PATCH 2/7] marvell-ccic: add clock tree support >for marvell-ccic driver > >On Tue, 4 Jun 2013 13:42:44 +0800 >lbyang <lbyang@xxxxxxxxxxx> wrote: > >> +static void mcam_clk_enable(struct mcam_camera *mcam) { >> + unsigned int i; >> + >> + for (i = 0; i < NR_MCAM_CLK; i++) { >> + if (!IS_ERR_OR_NULL(mcam->clk[i])) >> + clk_prepare_enable(mcam->clk[i]); >> + } >> +} > >It seems I already acked this patch, and I won't take that >back. I will point out, though, that IS_ERR_OR_NULL has >become a sort of lightning rod and that its use is probably >best avoided. > > >http://lists.infradead.org/pipermail/linux-arm-kernel/2013-Janu >ary/140543.html > >This relates to the use of ERR_PTR with that particular >pointer value; I still think just using NULL is better, but >maybe I'm missing something. > >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