Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1242402 > unrolled thread

Re: [PATCH] PCC: fix dereference of ERR_PTR

Started bySudip Mukherjee <sudipm.mukherjee@gmail.com>
First post2015-10-08 16:20 +0200
Last post2015-10-08 16:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] PCC: fix dereference of ERR_PTR Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-10-08 16:20 +0200

#1242402 — Re: [PATCH] PCC: fix dereference of ERR_PTR

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-10-08 16:20 +0200
SubjectRe: [PATCH] PCC: fix dereference of ERR_PTR
Message-ID<qhkd4-5VC-21@gated-at.bofh.it>
On Wed, Sep 16, 2015 at 07:34:24PM +0530, Sudip Mukherjee wrote:
> get_pcc_channel() does not return NULL on error it returns the error code
> in ERR_PTR, but we have been checking it for NULL.
> 
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
A gentle ping.

regards
sudip

>  drivers/mailbox/pcc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
> index 68885a8..45d85ae 100644
> --- a/drivers/mailbox/pcc.c
> +++ b/drivers/mailbox/pcc.c
> @@ -122,7 +122,7 @@ struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl,
>  	 */
>  	chan = get_pcc_channel(subspace_id);
>  
> -	if (!chan || chan->cl) {
> +	if (IS_ERR(chan) || chan->cl) {
>  		dev_err(dev, "Channel not found for idx: %d\n", subspace_id);
>  		return ERR_PTR(-EBUSY);
>  	}
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web