Message ID | 1397205401-24148-1-git-send-email-duanj.fnst@cn.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 04/11/2014 02:36 AM, Duan Jiong wrote: > This patch fixes coccinelle error regarding usage of IS_ERR and > PTR_ERR instead of PTR_ERR_OR_ZERO. Same comment as the other patch; I prefer the existing code (although I'll defer to Thierry as maintainer of both these pieces of code). It would help if the commit description quoted the coccinelle error.
On Fri, Apr 11, 2014 at 09:48:00AM -0600, Stephen Warren wrote: > On 04/11/2014 02:36 AM, Duan Jiong wrote: > > This patch fixes coccinelle error regarding usage of IS_ERR and > > PTR_ERR instead of PTR_ERR_OR_ZERO. > > Same comment as the other patch; I prefer the existing code (although > I'll defer to Thierry as maintainer of both these pieces of code). I feel the same way. And in fact I believe we already rejected a similar a while back for the same reason. > It would help if the commit description quoted the coccinelle error. "Suggestion" would probably be more accurate. There is no error here. Thierry
diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c index bcf9895..89aebe2 100644 --- a/drivers/gpu/drm/tegra/gem.c +++ b/drivers/gpu/drm/tegra/gem.c @@ -268,10 +268,7 @@ int tegra_bo_dumb_create(struct drm_file *file, struct drm_device *drm, bo = tegra_bo_create_with_handle(file, drm, args->size, 0, &args->handle); - if (IS_ERR(bo)) - return PTR_ERR(bo); - - return 0; + return PTR_ERR_OR_ZERO(bo); } int tegra_bo_dumb_map_offset(struct drm_file *file, struct drm_device *drm,
This patch fixes coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com> --- drivers/gpu/drm/tegra/gem.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)