Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033725AbdD0C4T (ORCPT ); Wed, 26 Apr 2017 22:56:19 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:36417 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033711AbdD0C4F (ORCPT ); Wed, 26 Apr 2017 22:56:05 -0400 From: Taeung Song To: Steven Rostedt Cc: linux-kernel@vger.kernel.org Subject: [PATCH v2] plugin python: Adjust the handling after PyRun_String() failed Date: Thu, 27 Apr 2017 11:55:58 +0900 Message-Id: <1493261758-32597-1-git-send-email-treeze.taeung@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 570 Lines: 24 Even though PyRun_String() failed, just 0 will be returned but we need to return -1 that means error status, so fix it. Signed-off-by: Taeung Song --- plugin_python.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin_python.c b/plugin_python.c index 2997679..c283ed7 100644 --- a/plugin_python.c +++ b/plugin_python.c @@ -55,7 +55,7 @@ static int load_plugin(struct pevent *pevent, const char *path, free(load); - return 0; + return res ? 0 : -1; } int PEVENT_PLUGIN_LOADER(struct pevent *pevent) -- 2.7.4