[lkml]   [2016]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/1] infiniband: hw: mlx4: fix improper return value
On 12/4/2016 1:45 AM, Pan Bian wrote:
> From: Pan Bian <>
> If uhw->inlen is non-zero, the value of variable err is 0 if the copy
> succeeds. Then, if kzalloc() or kmalloc() returns a NULL pointer, it
> will return 0 to the callers. As a result, the callers cannot detect the
> errors. This patch fixes the bug, assign "-ENOMEM" to err before the
> NULL pointer checks, and remove the initialization of err at the
> beginning.
> Bugzilla:
> Signed-off-by: Pan Bian <>

Thanks, applied.

Doug Ledford <>
GPG Key ID: 0E572FDD

[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2016-12-14 20:36    [W:0.026 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site